$NetBSD$

--- main/gbx/gbx_math.c.orig	2006-03-04 13:52:16.000000000 +0100
+++ main/gbx/gbx_math.c	2006-04-20 20:50:06.000000000 +0200
@@ -133,7 +133,11 @@ PUBLIC double fix(double x)
 
 PUBLIC double frexp10(double x, int *exp)
 {
+#if defined(OS_NETBSD)
+  double l, f;
+#else
   long double l, f;
+#endif
 
   if (x == 0.0)
   {
@@ -141,12 +145,20 @@ PUBLIC double frexp10(double x, int *exp
     return x;
   }
 
+#if defined(OS_NETBSD)
+  l = modf (log10 (fabs (x)), &f);
+#else
   l = modfl(log10l(fabsl(x)), &f);
+#endif
 
   if (f == 0.0)
     l = x;
   else
+#if defined(OS_NETBSD)
+    l = pow (10, l);
+#else
     l = powl(10, l);
+#endif
 
   if (x < 0.0) l = -l;
 
