diff -urN include-4.6.27.orig/m68k/__math.h include-4.6.27/m68k/__math.h
--- include-4.6.27.orig/m68k/__math.h	Sat Nov 19 18:04:58 1994
+++ include-4.6.27/m68k/__math.h	Sun Jan 29 05:35:39 1995
@@ -29,6 +29,13 @@
 #define	__MATH_INLINES	1
 #endif
 
+/*
+ * Workaround: due to a GCC bug gcc would ignore the __inline
+ * That way we'll leave a callable version in the library if
+ * gcc fails again...
+ */
+#define __extern static
+
 #define	__inline_mathop2(func, op)					      \
   extern __inline __CONSTVALUE double                                         \
   __m81_u(func)(double __mathop_x) __CONSTVALUE2;                             \
@@ -41,6 +48,17 @@
   }
 #define	__inline_mathop(op)		__inline_mathop2(op, op)
 
+#define	__inline_mathopl(func, op)					      \
+  __extern __inline __CONSTVALUE long double				      \
+  __m81_u(func)(long double __mathop_x) __CONSTVALUE2;			      \
+  __extern __inline __CONSTVALUE long double				      \
+  __m81_u(func)(long double __mathop_x)		       			      \
+  {									      \
+    long double __result;						      \
+    __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
+    return __result;							      \
+  }
+
 __inline_mathop(acos)
 __inline_mathop(asin)
 __inline_mathop(atan)
@@ -57,14 +75,38 @@
 __inline_mathop2(floor, intrz)
 __inline_mathop(sqrt)
 
+/* long double versions */
+__inline_mathopl(acosl, acos)
+__inline_mathopl(asinl, asin)
+__inline_mathopl(atanl, atan)
+__inline_mathopl(cosl, cos)
+__inline_mathopl(sinl, sin)
+__inline_mathopl(tanl, tan)
+__inline_mathopl(coshl, cosh)
+__inline_mathopl(sinhl, sinh)
+__inline_mathopl(tanhl, tanh)
+__inline_mathopl(expl, etox)
+__inline_mathopl(fabsl, abs)
+__inline_mathopl(log2l, log2)
+__inline_mathopl(log10l, log10)
+__inline_mathopl(logl, logn)
+__inline_mathopl(floorl, intrz)
+__inline_mathopl(sqrtl, sqrt)
+
 __inline_mathop2(__rint, int)
 __inline_mathop2(__expm1, etoxm1)
+__inline_mathopl(__rintl, int)
+__inline_mathopl(__expm1l, etoxm1)
 
 #ifdef	__USE_MISC
 __inline_mathop2(rint, int)
 __inline_mathop2(expm1, etoxm1)
 __inline_mathop2(log1p, lognp1)
 __inline_mathop(atanh)
+__inline_mathopl(rintl, int)
+__inline_mathopl(expm1l, etoxm1)
+__inline_mathopl(log1pl, lognp1)
+__inline_mathopl(atanhl, atanh)
 #endif
 
 extern __inline __CONSTVALUE double
@@ -188,6 +230,136 @@
 __m81_u(__isnan)(double __value) __CONSTVALUE2;
 extern __inline __CONSTVALUE int
 __m81_u(__isnan)(double __value)
+{
+  char __result;
+  __asm("ftst%.x %1\n"
+	"fsun %0" : "=g" (__result) : "f" (__value));
+  return __result;
+}
+
+/* long double versions */
+
+extern __inline __CONSTVALUE long double
+__m81_u(__dreml)(long double __x, long double __y) __CONSTVALUE2;
+extern __inline __CONSTVALUE long double
+__m81_u(__dreml)(long double __x, long double __y)
+{
+  long double __result;
+  __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+  return __result;
+}
+
+extern __inline __CONSTVALUE long double
+__m81_u(ldexpl)(long double __x, int __e) __CONSTVALUE2;
+extern __inline __CONSTVALUE long double
+__m81_u(ldexpl)(long double __x, int __e)
+{
+  long double __result;
+  long double __double_e = (long double) __e;
+  __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_e), "0" (__x));
+  return __result;
+}
+
+__extern __inline __CONSTVALUE long double
+__m81_u(fmodl)(long double __x, long double __y) __CONSTVALUE2;
+__extern __inline __CONSTVALUE long double
+__m81_u(fmodl)(long double __x, long double __y)
+{
+  long double __result;
+  __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+  return __result;
+}
+
+extern __inline long double
+__m81_u(frexpl)(long double __value, int *__expptr);
+extern __inline long double
+__m81_u(frexpl)(long double __value, int *__expptr)
+{
+  long double __mantissa, __exponent;
+  __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
+  __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value));
+  *__expptr = (int) __exponent;
+  return __mantissa;
+}
+
+__extern __inline __CONSTVALUE long double
+__m81_u(powl)(long double __x, long double __y) __CONSTVALUE2;
+__extern __inline __CONSTVALUE long double
+__m81_u(powl)(long double __x, long double __y)
+{
+  long double __result;
+  if (__y == 0.0L || __x == 1.0L)
+    __result = 1.0L;
+  else if (__y == 1.0L)
+    __result = __x;
+  else if (__y == 2.0L)
+    __result = __x * __x;
+  else if (__x == 10.0L)
+    __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y));
+  else if (__x == 2.0L)
+    __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y));
+  else if (__x < 0.0L)
+    {
+      long double __temp = __m81_u (floorl) (__y);
+      if (__y == __temp)
+	{
+	  int i = (int) __y;
+	  __result = __m81_u (expl) (__y * __m81_u (logl) (-__x));
+	  if (i & 1)
+	    __result = -__result;
+	}
+      else
+	__result = __m81_u (expl) (__y * __m81_u (logl) (__x));
+    }
+  else
+    __result = __m81_u(expl)(__y * __m81_u(logl)(__x));
+  return __result;
+}
+
+__extern __inline __CONSTVALUE long double
+__m81_u(ceill)(long double __x) __CONSTVALUE2;
+__extern __inline __CONSTVALUE long double
+__m81_u(ceill)(long double __x)
+{
+  long double __result;
+  unsigned long int __ctrl_reg;
+  __asm("fmove%.l fpcr, %0" : "=g" (__ctrl_reg));
+  /* Set rounding towards positive infinity.  */
+  __asm("fmove%.l %0, fpcr" : /* No outputs.  */ : "g" (__ctrl_reg | 0x30));
+  /* Convert X to an integer, using +Inf rounding.  */
+  __asm("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
+  /* Restore the previous rounding mode.  */
+  __asm("fmove%.l %0, fpcr" : /* No outputs.  */ : "g" (__ctrl_reg));
+  return __result;
+}
+
+extern __inline long double
+__m81_u(modfl)(long double __value, long double *__iptr);
+extern __inline long double
+__m81_u(modfl)(long double __value, long double *__iptr)
+{
+  long double __modf_int = __m81_u(floorl)(__value);
+  *__iptr = __modf_int;
+  return __value - __modf_int;
+}
+
+extern __inline __CONSTVALUE int
+__m81_u(__isinfl)(long double __value) __CONSTVALUE2;
+extern __inline __CONSTVALUE int
+__m81_u(__isinfl)(long double __value)
+{
+  /* There is no branch-condition for infinity,
+     so we must extract and examine the condition codes manually.  */
+  unsigned long int __fpsr;
+  __asm("ftst%.x %1\n"
+	"fmove%.l fpsr, %0" : "=g" (__fpsr) : "f" (__value));
+  return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0;
+}
+
+extern __inline __CONSTVALUE int
+__m81_u(__isnanl)(long double __value) __CONSTVALUE2;
+extern __inline __CONSTVALUE int
+__m81_u(__isnanl)(long double __value)
 {
   char __result;
   __asm("ftst%.x %1\n"
diff -urN include-4.6.27.orig/math.h include-4.6.27/math.h
--- include-4.6.27.orig/math.h	Mon Nov 28 17:08:53 1994
+++ include-4.6.27/math.h	Wed Jan 25 04:22:44 1995
@@ -219,16 +219,17 @@
 /* Return the Bessel function of X of the second kind of order N.  */
 extern __CONSTVALUE double yn  __P ((int __n, double __x)) __CONSTVALUE2;
 
+#if !defined (__mc68000__) || defined (__NO_MATH_INLINES)
 extern __CONSTVALUE __long_double_t acosl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t asinl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t atanl __P ((__long_double_t __x));
-extern __CONSTVALUE __long_double_t atan2l __P ((__long_double_t __y, __long_double_t __x));
 extern __CONSTVALUE __long_double_t cosl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t sinl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t tanl __P ((__long_double_t __x));
-extern __CONSTVALUE __long_double_t hypotl __P ((__long_double_t __x, __long_double_t __y)) __CONSTVALUE2;
+#endif /* m68k inlines */
 extern __CONSTVALUE __long_double_t acoshl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t asinhl __P ((__long_double_t __x));
+#if !defined (__mc68000__) || defined (__NO_MATH_INLINES)
 extern __CONSTVALUE __long_double_t atanhl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t coshl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t sinhl __P ((__long_double_t __x));
@@ -246,6 +247,9 @@
 extern __CONSTVALUE __long_double_t fabsl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t floorl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t fmodl __P ((__long_double_t __x, __long_double_t __y));
+#endif /* m68k inlines */
+extern __CONSTVALUE __long_double_t atan2l __P ((__long_double_t __y, __long_double_t __x));
+extern __CONSTVALUE __long_double_t hypotl __P ((__long_double_t __x, __long_double_t __y)) __CONSTVALUE2;
 
 extern __CONSTVALUE __long_double_t erfl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t erfcl __P ((__long_double_t __x));
@@ -257,10 +261,12 @@
 extern __CONSTVALUE __long_double_t jnl __P ((int __n, __long_double_t __x));
 extern __CONSTVALUE __long_double_t ynl __P ((int __n, __long_double_t __x));
 extern __CONSTVALUE __long_double_t cbrtl __P ((__long_double_t __x));
+#if !defined (__mc68000__) || defined (__NO_MATH_INLINES)
 extern __CONSTVALUE __long_double_t log1pl __P ((__long_double_t __x));
 extern __CONSTVALUE __long_double_t log2l __P ((__long_double_t __x));
-extern __CONSTVALUE __long_double_t pow2l __P ((__long_double_t __x, __long_double_t __y));
-extern __CONSTVALUE __long_double_t pow10l __P ((__long_double_t __x, __long_double_t __y));
+#endif
+extern __CONSTVALUE __long_double_t pow2l __P ((__long_double_t __x));
+extern __CONSTVALUE __long_double_t pow10l __P ((__long_double_t __x));
 
 __END_DECLS
 
