Index: trunk/src/emx/include/386/asm.h
===================================================================
--- trunk/src/emx/include/386/asm.h	(revision 2147)
+++ trunk/src/emx/include/386/asm.h	(revision 2150)
@@ -96,4 +96,5 @@
 #define	STDENTRY(x)	ENTRY(__CONCAT(_std_,x)) /* libc */
 
+
 #define RCSID(x)	.text; .asciz x
 
Index: trunk/src/emx/include/complex.h
===================================================================
--- trunk/src/emx/include/complex.h	(revision 2147)
+++ trunk/src/emx/include/complex.h	(revision 2150)
@@ -61,4 +61,65 @@
 long double	creall(long double complex);
 
+/* bird:  */
+long double          cabsl(long double complex);
+double complex       cacos(double complex);
+float complex        cacosf(float complex);
+double complex       cacosh(double complex);
+float complex        cacoshf(float complex);
+long double complex  cacoshl(long double complex);
+long double complex  cacosl(long double complex);
+double               carg(double complex);
+float                cargf(float complex);
+long double          cargl(long double complex);
+double complex       casin(double complex);
+float complex        casinf(float complex);
+double complex       casinh(double complex);
+float complex        casinhf(float complex);
+long double complex  casinhl(long double complex);
+long double complex  casinl(long double complex);
+double complex       catan(double complex);
+float complex        catanf(float complex);
+double complex       catanh(double complex);
+float complex        catanhf(float complex);
+long double complex  catanhl(long double complex);
+long double complex  catanl(long double complex);
+double complex       ccos(double complex);
+float complex        ccosf(float complex);
+double complex       ccosh(double complex);
+float complex        ccoshf(float complex);
+long double complex  ccoshl(long double complex);
+long double complex  ccosl(long double complex);
+double complex       cexp(double complex);
+float complex        cexpf(float complex);
+long double complex  cexpl(long double complex);
+double complex       clog(double complex);
+float complex        clogf(float complex);
+long double complex  clogl(long double complex);
+double complex       cpow(double complex, double complex);
+float complex        cpowf(float complex, float complex);
+long double complex  cpowl(long double complex, long double complex);
+double complex       cproj(double complex);
+float complex        cprojf(float complex);
+long double complex  cprojl(long double complex);
+double complex       csin(double complex);
+float complex        csinf(float complex);
+double complex       csinh(double complex);
+float complex        csinhf(float complex);
+long double complex  csinhl(long double complex);
+long double complex  csinl(long double complex);
+double complex       csqrt(double complex);
+float complex        csqrtf(float complex);
+long double complex  csqrtl(long double complex);
+double complex       ctan(double complex);
+float complex        ctanf(float complex);
+double complex       ctanh(double complex);
+float complex        ctanhf(float complex);
+long double complex  ctanhl(long double complex);
+long double complex  ctanl(long double complex);
+
+/* gnu extensions? */
+double complex       clog10(double complex);
+float complex        clog10f(float complex);
+long double complex  clog10l(long double complex);
 __END_DECLS
 
Index: trunk/src/emx/include/endian.h
===================================================================
--- trunk/src/emx/include/endian.h	(revision 2150)
+++ trunk/src/emx/include/endian.h	(revision 2150)
@@ -0,0 +1,74 @@
+/* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/**
+ * GLIBC 2.3.3
+ */
+
+#ifndef	_ENDIAN_H
+#define	_ENDIAN_H	1
+
+#include <features.h>
+
+/* Definitions for byte order, according to significance of bytes,
+   from low addresses to high addresses.  The value is what you get by
+   putting '4' in the most significant byte, '3' in the second most
+   significant byte, '2' in the second least significant byte, and '1'
+   in the least significant byte, and then writing down one digit for
+   each byte, starting with the byte at the lowest address at the left,
+   and proceeding to the byte with the highest address at the right.  */
+
+#if 0 /* bird */
+#define	__LITTLE_ENDIAN	1234
+#define	__BIG_ENDIAN	4321
+#define	__PDP_ENDIAN	3412
+
+/* This file defines `__BYTE_ORDER' for the particular machine.  */
+#include <bits/endian.h>
+
+#else  /* bird */
+
+#include <sys/endian.h>
+#define	__LITTLE_ENDIAN	_LITTLE_ENDIAN
+#define	__BIG_ENDIAN	_BIG_ENDIAN
+#define	__PDP_ENDIAN	_PDP_ENDIAN
+#define __BYTE_ORDER	_BYTE_ORDER
+#endif /* bird */
+
+/* Some machines may need to use a different endianness for floating point
+   values.  */
+#ifndef __FLOAT_WORD_ORDER
+# define __FLOAT_WORD_ORDER __BYTE_ORDER
+#endif
+
+#if 0 /* bird */
+#ifdef	__USE_BSD
+# define LITTLE_ENDIAN	__LITTLE_ENDIAN
+# define BIG_ENDIAN	__BIG_ENDIAN
+# define PDP_ENDIAN	__PDP_ENDIAN
+# define BYTE_ORDER	__BYTE_ORDER
+#endif
+#endif /* bird */
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define __LONG_LONG_PAIR(HI, LO) LO, HI
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define __LONG_LONG_PAIR(HI, LO) HI, LO
+#endif
+
+#endif	/* endian.h */
Index: trunk/src/emx/include/fpu_control.h
===================================================================
--- trunk/src/emx/include/fpu_control.h	(revision 2150)
+++ trunk/src/emx/include/fpu_control.h	(revision 2150)
@@ -0,0 +1,105 @@
+/* FPU control word bits.  i387 version.
+   Copyright (C) 1993,1995-1998,2000,2001,2003 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Olaf Flebbe.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+/**
+ * GLIBC 2.3.x CVS
+ */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H	1
+
+/* Here is the dirty part. Set up your 387 through the control word
+ * (cw) register.
+ *
+ *     15-13    12  11-10  9-8     7-6     5    4    3    2    1    0
+ * | reserved | IC | RC  | PC | reserved | PM | UM | OM | ZM | DM | IM
+ *
+ * IM: Invalid operation mask
+ * DM: Denormalized operand mask
+ * ZM: Zero-divide mask
+ * OM: Overflow mask
+ * UM: Underflow mask
+ * PM: Precision (inexact result) mask
+ *
+ * Mask bit is 1 means no interrupt.
+ *
+ * PC: Precision control
+ * 11 - round to extended precision
+ * 10 - round to double precision
+ * 00 - round to single precision
+ *
+ * RC: Rounding control
+ * 00 - rounding to nearest
+ * 01 - rounding down (toward - infinity)
+ * 10 - rounding up (toward + infinity)
+ * 11 - rounding toward zero
+ *
+ * IC: Infinity control
+ * That is for 8087 and 80287 only.
+ *
+ * The hardware default is 0x037f which we use.
+ */
+
+#include <features.h>
+
+/* masking of interrupts */
+#define _FPU_MASK_IM  0x01
+#define _FPU_MASK_DM  0x02
+#define _FPU_MASK_ZM  0x04
+#define _FPU_MASK_OM  0x08
+#define _FPU_MASK_UM  0x10
+#define _FPU_MASK_PM  0x20
+
+/* precision control */
+#define _FPU_EXTENDED 0x300	/* libm requires double extended precision.  */
+#define _FPU_DOUBLE   0x200
+#define _FPU_SINGLE   0x0
+
+/* rounding control */
+#define _FPU_RC_NEAREST 0x0    /* RECOMMENDED */
+#define _FPU_RC_DOWN    0x400
+#define _FPU_RC_UP      0x800
+#define _FPU_RC_ZERO    0xC00
+
+#define _FPU_RESERVED 0xF0C0  /* Reserved bits in cw */
+
+
+/* The fdlibm code requires strict IEEE double precision arithmetic,
+   and no interrupts for exceptions, rounding to nearest.  */
+
+#define _FPU_DEFAULT  0x037f
+
+/* IEEE:  same as above.  */
+#define _FPU_IEEE     0x037f
+
+/* Type of the control word.  */
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
+
+/* Macros for accessing the hardware control word.
+
+   Note that the use of these macros is no sufficient anymore with
+   recent hardware.  Some floating point operations are executed in
+   the SSE/SSE2 engines which have their own control and status register.  */
+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
+
+/* Default control word set at startup.  */
+extern fpu_control_t __fpu_control;
+
+#endif	/* fpu_control.h */
Index: trunk/src/emx/include/ieee754.h
===================================================================
--- trunk/src/emx/include/ieee754.h	(revision 2150)
+++ trunk/src/emx/include/ieee754.h	(revision 2150)
@@ -0,0 +1,202 @@
+/* Copyright (C) 1992, 1995, 1996, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+/** @file
+ * GLIBC 2.3.x CVS
+ */
+
+#ifndef _IEEE754_H
+
+#define _IEEE754_H 1
+#include <features.h>
+
+#include <endian.h>
+
+__BEGIN_DECLS
+
+union ieee754_float
+  {
+    float f;
+
+    /* This is the IEEE 754 single-precision format.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:8;
+	unsigned int mantissa:23;
+#endif				/* Big endian.  */
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+	unsigned int mantissa:23;
+	unsigned int exponent:8;
+	unsigned int negative:1;
+#endif				/* Little endian.  */
+      } ieee;
+
+    /* This format makes it easier to see if a NaN is a signalling NaN.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:8;
+	unsigned int quiet_nan:1;
+	unsigned int mantissa:22;
+#endif				/* Big endian.  */
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+	unsigned int mantissa:22;
+	unsigned int quiet_nan:1;
+	unsigned int exponent:8;
+	unsigned int negative:1;
+#endif				/* Little endian.  */
+      } ieee_nan;
+  };
+
+#define IEEE754_FLOAT_BIAS	0x7f /* Added to exponent.  */
+
+
+union ieee754_double
+  {
+    double d;
+
+    /* This is the IEEE 754 double-precision format.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:11;
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa0:20;
+	unsigned int mantissa1:32;
+#endif				/* Big endian.  */
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+# if	__FLOAT_WORD_ORDER == BIG_ENDIAN
+	unsigned int mantissa0:20;
+	unsigned int exponent:11;
+	unsigned int negative:1;
+	unsigned int mantissa1:32;
+# else
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa1:32;
+	unsigned int mantissa0:20;
+	unsigned int exponent:11;
+	unsigned int negative:1;
+# endif
+#endif				/* Little endian.  */
+      } ieee;
+
+    /* This format makes it easier to see if a NaN is a signalling NaN.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:11;
+	unsigned int quiet_nan:1;
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa0:19;
+	unsigned int mantissa1:32;
+#else
+# if	__FLOAT_WORD_ORDER == BIG_ENDIAN
+	unsigned int mantissa0:19;
+	unsigned int quiet_nan:1;
+	unsigned int exponent:11;
+	unsigned int negative:1;
+	unsigned int mantissa1:32;
+# else
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa1:32;
+	unsigned int mantissa0:19;
+	unsigned int quiet_nan:1;
+	unsigned int exponent:11;
+	unsigned int negative:1;
+# endif
+#endif
+      } ieee_nan;
+  };
+
+#define IEEE754_DOUBLE_BIAS	0x3ff /* Added to exponent.  */
+
+
+union ieee854_long_double
+  {
+    long double d;
+
+    /* This is the IEEE 854 double-extended-precision format.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:15;
+	unsigned int empty:16;
+	unsigned int mantissa0:32;
+	unsigned int mantissa1:32;
+#endif
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+# if	__FLOAT_WORD_ORDER == BIG_ENDIAN
+	unsigned int exponent:15;
+	unsigned int negative:1;
+	unsigned int empty:16;
+	unsigned int mantissa0:32;
+	unsigned int mantissa1:32;
+# else
+	unsigned int mantissa1:32;
+	unsigned int mantissa0:32;
+	unsigned int exponent:15;
+	unsigned int negative:1;
+	unsigned int empty:16;
+# endif
+#endif
+      } ieee;
+
+    /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:15;
+	unsigned int empty:16;
+	unsigned int one:1;
+	unsigned int quiet_nan:1;
+	unsigned int mantissa0:30;
+	unsigned int mantissa1:32;
+#endif
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+# if	__FLOAT_WORD_ORDER == BIG_ENDIAN
+	unsigned int exponent:15;
+	unsigned int negative:1;
+	unsigned int empty:16;
+	unsigned int mantissa0:30;
+	unsigned int quiet_nan:1;
+	unsigned int one:1;
+	unsigned int mantissa1:32;
+# else
+	unsigned int mantissa1:32;
+	unsigned int mantissa0:30;
+	unsigned int quiet_nan:1;
+	unsigned int one:1;
+	unsigned int exponent:15;
+	unsigned int negative:1;
+	unsigned int empty:16;
+# endif
+#endif
+      } ieee_nan;
+  };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+
+__END_DECLS
+
+#endif /* ieee754.h */
Index: trunk/src/emx/include/math.h
===================================================================
--- trunk/src/emx/include/math.h	(revision 2147)
+++ trunk/src/emx/include/math.h	(revision 2150)
@@ -424,12 +424,12 @@
 long double	ceill(long double);
 long double	copysignl(long double, long double) __pure2;
-#if 1 /* bird: we've got some of these */
+#if 1 /* bird */
 long double	coshl(long double);
 long double	cosl(long double);
-/*long double	erfcl(long double);
+long double	erfcl(long double);
 long double	erfl(long double);
-long double	exp2l(long double);*/
+long double	exp2l(long double);
 long double	expl(long double);
-/*long double	expm1l(long double);*/
+long double	expm1l(long double);
 #endif
 long double	fabsl(long double) __pure2;
@@ -439,31 +439,31 @@
 long double	fmaxl(long double, long double) __pure2;
 long double	fminl(long double, long double) __pure2;
-#if 1 /* bird: we've got this one */
+#if 1 /* bird */
 long double	fmodl(long double, long double);
 #endif
 long double	frexpl(long double value, int *); /* fundamentally !__pure2 */
-#if 1 /* bird: we've got this one */
+#if 1 /* bird */
 long double	hypotl(long double, long double);
 #endif
 int		ilogbl(long double) __pure2;
 long double	ldexpl(long double, int);
-#if 0
+#if 1 /* bird */
 long double	lgammal(long double);
 long long	llrintl(long double);
 #endif
 long long	llroundl(long double);
-#if 1 /* bird: we've got some of these */
+#if 1 /* bird */
 long double	log10l(long double);
-/*long double	log1pl(long double);
+long double	log1pl(long double);
 long double	log2l(long double);
-long double	logbl(long double);*/
+long double	logbl(long double);
 long double	logl(long double);
-/*long		lrintl(long double);*/
+long		lrintl(long double);
 #endif
 long		lroundl(long double);
-#if 1 /* bird: we've got some of these. */
+#if 1 /* bird */
 long double	modfl(long double, long double *); /* fundamentally !__pure2 */
 long double	nanl(const char *) __pure2;
-/*long double	nearbyintl(long double);*/
+long double	nearbyintl(long double);
 #endif
 long double	nextafterl(long double, long double);
@@ -471,8 +471,8 @@
 float		nexttowardf(float, long double);
 long double	nexttowardl(long double, long double);
-#if 1 /* bird: we've got powl. */
+#if 1 /* bird */
 long double	powl(long double, long double);
-/*long double	remainderl(long double, long double);
-long double	remquol(long double, long double, int *);*/
+long double	remainderl(long double, long double);
+long double	remquol(long double, long double, int *);
 long double	rintl(long double);
 #endif
@@ -486,13 +486,57 @@
 long double	tanhl(long double);
 long double	tanl(long double);
-/*long double	tgammal(long double); */
+long double	tgammal(long double);
 #endif
 long double	truncl(long double);
 
-/* bird: these were missing, gcc apparnetly inlines them. */
+/* bird: these were missing, gcc apparently inlines them. */
 double          nan(const char *);
 float           nanf(const char *);
 
 #endif /* __ISO_C_VISIBLE >= 1999 */
+
+#ifdef __USE_GNU
+/*
+ * In GLIBC there are long variants of the XOPEN/SVID constant
+ * block some pages ago. We need this to get the math tests going.
+ */
+#define M_El                2.7182818284590452353602874713526625L
+#define M_LOG2El            1.4426950408889634073599246810018921L
+#define M_LOG10El           0.4342944819032518276511289189166051L
+#define M_LN2l              0.6931471805599453094172321214581766L
+#define M_LN10l             2.3025850929940456840179914546843642L
+#define M_PIl               3.1415926535897932384626433832795029L
+#define M_PI_2l             1.5707963267948966192313216916397514L
+#define M_PI_4l             0.7853981633974483096156608458198757L
+#define M_1_PIl             0.3183098861837906715377675267450287L
+#define M_2_PIl             0.6366197723675813430755350534900574L
+#define M_2_SQRTPIl         1.1283791670955125738961589031215452L
+#define M_SQRT2l            1.4142135623730950488016887242096981L
+#define M_SQRT1_2l          0.7071067811865475244008443621048490L
+#endif
+
+#ifdef __USE_GNU
+
+void sincos(double, double *, double *);
+void sincosf(float, float *, float *);
+void sincosl(long double, long double *, long double *);
+float exp10f(float);
+double exp10(double);
+long double exp10l(long double);
+float log2f(float);
+double log2(double);
+long double log2l(long double);
+float tgammaf(float);
+long double significandl(long double);
+long double j0l(long double);
+long double j1l(long double);
+long double jnl(int, long double);
+long double scalbl(long double, long double);
+long double y0l(long double);
+long double y1l(long double);
+long double ynl(int, long double);
+long double lgammal_r(long double,int *);
+long double gammal(long double);
+#endif
 __END_DECLS
 
Index: trunk/src/emx/include/sys/cdefs.h
===================================================================
--- trunk/src/emx/include/sys/cdefs.h	(revision 2147)
+++ trunk/src/emx/include/sys/cdefs.h	(revision 2150)
@@ -302,4 +302,7 @@
 	__asm__(".previous")
 #endif	/* __STDC__ */
+#else
+#define	__strong_reference(sym,aliassym)	\
+	extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
 #endif	/* __GNUC__ || __INTEL_COMPILER */
 
Index: trunk/src/emx/src/lib/lgpl/include/config.h
===================================================================
--- trunk/src/emx/src/lib/lgpl/include/config.h	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/include/config.h	(revision 2150)
@@ -113,4 +113,6 @@
 #endif
 
+#ifndef __ASSEMBLER__
 #include "libc-alias-glibc.h"
 #endif
+#endif
Index: trunk/src/emx/src/lib/lgpl/include/libc-alias-glibc.h
===================================================================
--- trunk/src/emx/src/lib/lgpl/include/libc-alias-glibc.h	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/include/libc-alias-glibc.h	(revision 2150)
@@ -477,3 +477,93 @@
 #define __funlockfile _STD(funlockfile)
 
+/* complex */
+#define __cabs       _STD(cabs)
+#define __cabsf      _STD(cabsf)
+#define __cimag      _STD(cimag)
+#define __cimagf     _STD(cimagf)
+#define __cimagl     _STD(cimagl)
+#define __conj       _STD(conj)
+#define __conjf      _STD(conjf)
+#define __conjl      _STD(conjl)
+#define __creal      _STD(creal)
+#define __crealf     _STD(crealf)
+#define __creall     _STD(creall)
+#define __cabsl _STD(cabsl)
+#define __cacos _STD(cacos)
+#define __cacosf _STD(cacosf)
+#define __cacosh _STD(cacosh)
+#define __cacoshf _STD(cacoshf)
+#define __cacoshl _STD(cacoshl)
+#define __cacosl _STD(cacosl)
+#define __carg _STD(carg)
+#define __cargf _STD(cargf)
+#define __cargl _STD(cargl)
+#define __casin _STD(casin)
+#define __casinf _STD(casinf)
+#define __casinh _STD(casinh)
+#define __casinhf _STD(casinhf)
+#define __casinhl _STD(casinhl)
+#define __casinl _STD(casinl)
+#define __catan _STD(catan)
+#define __catanf _STD(catanf)
+#define __catanh _STD(catanh)
+#define __catanhf _STD(catanhf)
+#define __catanhl _STD(catanhl)
+#define __catanl _STD(catanl)
+#define __ccos _STD(ccos)
+#define __ccosf _STD(ccosf)
+#define __ccosh _STD(ccosh)
+#define __ccoshf _STD(ccoshf)
+#define __ccoshl _STD(ccoshl)
+#define __ccosl _STD(ccosl)
+#define __cexp _STD(cexp)
+#define __cexpf _STD(cexpf)
+#define __cexpl _STD(cexpl)
+#define __clog _STD(clog)
+#define __clogf _STD(clogf)
+#define __clogl _STD(clogl)
+#define __cpow _STD(cpow)
+#define __cpowf _STD(cpowf)
+#define __cpowl _STD(cpowl)
+#define __cproj _STD(cproj)
+#define __cprojf _STD(cprojf)
+#define __cprojl _STD(cprojl)
+#define __csin _STD(csin)
+#define __csinf _STD(csinf)
+#define __csinh _STD(csinh)
+#define __csinhf _STD(csinhf)
+#define __csinhl _STD(csinhl)
+#define __csinl _STD(csinl)
+#define __csqrt _STD(csqrt)
+#define __csqrtf _STD(csqrtf)
+#define __csqrtl _STD(csqrtl)
+#define __ctan _STD(ctan)
+#define __ctanf _STD(ctanf)
+#define __ctanh _STD(ctanh)
+#define __ctanhf _STD(ctanhf)
+#define __ctanhl _STD(ctanhl)
+#define __ctanl _STD(ctanl)
+
+/* more math */
+#define __isinf isinf
+#define __isnan isnan
+#define __isnanf isnanf
+#define __nanf nanf
+#define __nanl nanl
+#define __sincosf   _STD(sincosf)
+#define __sincosl   _STD(sincosl)
+#define __sincos    _STD(sincos)
+#define __log1pl    _STD(log1pl)
+#define __expm1l    _STD(expm1l)
+#define __scalbnl   _STD(scalbnl)
+#define __gammal    _STD(gammal)
+#define __gammal_r  _STD(gammal_r)
+#define __lgammal   _STD(lgammal)
+#define __lgammal_r _STD(lgammal_r)
+#define __gamma     _STD(gamma)
+#define __gamma_r   _STD(gamma_r)
+#define __lgamma    _STD(lgamma)
+#define __lgamma_r  _STD(lgamma_r)
+
+
 #endif
Index: trunk/src/emx/src/lib/lgpl/math/cabsl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/math/cabsl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/math/cabsl.c	(revision 2150)
@@ -19,11 +19,12 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
 long double
-__cabsl (long double _Complex z)
+_STD(cabsl) (long double _Complex z)
 {
   return __hypotl (__real__ z, __imag__ z);
 }
-weak_alias (__cabsl, cabsl)
+/*  w e a k _ a l i a s (__cabsl, cabsl) */
Index: trunk/src/emx/src/lib/lgpl/math/carg.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/math/carg.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/math/carg.c	(revision 2150)
@@ -19,15 +19,16 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
 double
-__carg (__complex__ double x)
+_STD(carg) (__complex__ double x)
 {
   return __atan2 (__imag__ x, __real__ x);
 }
-weak_alias (__carg, carg)
+/*  w e a k _ a l i a s (__carg, carg) */
 #ifdef NO_LONG_DOUBLE
-strong_alias (__carg, __cargl)
-weak_alias (__carg, cargl)
+/*  s t r o n g _ a l i a s (__carg, __cargl) */
+/* w e a k _ a l i a s (__carg, cargl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/math/cargl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/math/cargl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/math/cargl.c	(revision 2150)
@@ -19,11 +19,12 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
 long double
-__cargl (__complex__ long double x)
+_STD(cargl) (__complex__ long double x)
 {
   return __atan2l (__imag__ x, __real__ x);
 }
-weak_alias (__cargl, cargl)
+/*w e a k _ a l i a s (__cargl, cargl) */
Index: trunk/src/emx/src/lib/lgpl/math/math.smak
===================================================================
--- trunk/src/emx/src/lib/lgpl/math/math.smak	(revision 2150)
+++ trunk/src/emx/src/lib/lgpl/math/math.smak	(revision 2150)
@@ -0,0 +1,1 @@
+libc.TSRC += $(wildcard src/lib/lgpl/math/*.c)
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/cargf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/cargf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/cargf.c	(revision 2150)
@@ -19,11 +19,12 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
 float
-__cargf (__complex__ float x)
+_STD(cargf) (__complex__ float x)
 {
   return __atan2f (__imag__ x, __real__ x);
 }
-weak_alias (__cargf, cargf)
+/* w e a k _ a  l i a s (__cargf, cargf) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/fpu_control.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/fpu_control.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/fpu_control.c	(revision 2150)
@@ -18,4 +18,5 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <math.h>
 #include <fpu_control.h>
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/math_private.h
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/math_private.h	(revision 2150)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/math_private.h	(revision 2150)
@@ -0,0 +1,7 @@
+#include "../../../msun/src/math_private.h"
+#ifdef __INNOTEK_LIBC__
+# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
+# define _strong_alias(name, aliasname) \
+  extern __typeof (name) aliasname __attribute__ ((alias (#name)));
+#endif
+
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacos.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacos.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacos.c	(revision 2150)
@@ -19,9 +19,10 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
 __complex__ double
-__cacos (__complex__ double x)
+_STD(cacos) (__complex__ double x)
 {
   __complex__ double y;
@@ -35,7 +36,7 @@
   return res;
 }
-weak_alias (__cacos, cacos)
+/* w e a k _ a l i a s  (__cacos, cacos) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__cacos, __cacosl)
-weak_alias (__cacos, cacosl)
+/* w e a k _ a l i a s  (__cacos, cacosl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosf.c	(revision 2150)
@@ -19,9 +19,10 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
 __complex__ float
-__cacosf (__complex__ float x)
+_STD(cacosf) (__complex__ float x)
 {
   __complex__ float y;
@@ -36,4 +37,4 @@
 }
 #ifndef __cacosf
-weak_alias (__cacosf, cacosf)
+/* w e a k _ a l i a s  (__cacosf, cacosf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosh.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosh.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosh.c	(revision 2150)
@@ -19,10 +19,12 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
+#define __nan(x) __builtin_nan(x)
 
 
 __complex__ double
-__cacosh (__complex__ double x)
+_STD(cacosh) (__complex__ double x)
 {
   __complex__ double res;
@@ -82,7 +84,7 @@
   return res;
 }
-weak_alias (__cacosh, cacosh)
+/* w e a k _ a l i a s  (__cacosh, cacosh) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__cacosh, __cacoshl)
-weak_alias (__cacosh, cacoshl)
+/* w e a k _ a l i a s  (__cacosh, cacoshl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacoshf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacoshf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacoshf.c	(revision 2150)
@@ -19,4 +19,5 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -25,5 +26,5 @@
 
 __complex__ float
-__cacoshf (__complex__ float x)
+_STD(cacoshf) (__complex__ float x)
 {
   __complex__ float res;
@@ -98,4 +99,4 @@
 }
 #ifndef __cacoshf
-weak_alias (__cacoshf, cacoshf)
+/*w e a k _ a l i a s (__cacoshf, cacoshf)*/
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacoshl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacoshl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacoshl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -82,3 +83,3 @@
   return res;
 }
-weak_alias (__cacoshl, cacoshl)
+/* w e a k _ a l i a s  (__cacoshl, cacoshl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cacosl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -35,3 +36,3 @@
   return res;
 }
-weak_alias (__cacosl, cacosl)
+/* w e a k _ a l i a s  (__cacosl, cacosl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casin.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casin.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casin.c	(revision 2150)
@@ -19,10 +19,11 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
-
+#define __nan(x) __builtin_nan(x)
 
 __complex__ double
-__casin (__complex__ double x)
+_STD(casin) (__complex__ double x)
 {
   __complex__ double res;
@@ -60,7 +61,7 @@
   return res;
 }
-weak_alias (__casin, casin)
+/* w e a k _ a l i a s  (__casin, casin) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__casin, __casinl)
-weak_alias (__casin, casinl)
+/* w e a k _ a l i a s  (__casin, casinl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -24,5 +25,5 @@
 
 __complex__ float
-__casinf (__complex__ float x)
+_STD(casinf) (__complex__ float x)
 {
   __complex__ float res;
@@ -61,4 +62,4 @@
 }
 #ifndef __casinf
-weak_alias (__casinf, casinf)
+/* w e a k _ a l i a s  (__casinf, casinf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinh.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinh.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinh.c	(revision 2150)
@@ -19,10 +19,11 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
-
+#define __nan(x) __builtin_nan(x)
 
 __complex__ double
-__casinh (__complex__ double x)
+_STD(casinh) (__complex__ double x)
 {
   __complex__ double res;
@@ -78,7 +79,7 @@
   return res;
 }
-weak_alias (__casinh, casinh)
+/* w e a k _ a l i a s  (__casinh, casinh) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__casinh, __casinhl)
-weak_alias (__casinh, casinhl)
+/* w e a k _ a l i a s  (__casinh, casinhl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinhf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinhf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinhf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -24,5 +25,5 @@
 
 __complex__ float
-__casinhf (__complex__ float x)
+_STD(casinhf) (__complex__ float x)
 {
   __complex__ float res;
@@ -79,4 +80,4 @@
 }
 #ifndef __casinhf
-weak_alias (__casinhf, casinhf)
+/* w e a k _ a l i a s  (__casinhf, casinhf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinhl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinhl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinhl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -78,3 +79,3 @@
   return res;
 }
-weak_alias (__casinhl, casinhl)
+/* w e a k _ a l i a s  (__casinhl, casinhl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_casinl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -60,3 +61,3 @@
   return res;
 }
-weak_alias (__casinl, casinl)
+/* w e a k _ a l i a s  (__casinl, casinl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catan.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catan.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catan.c	(revision 2150)
@@ -19,12 +19,14 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
 #include "math_private.h"
+#define __nan(x) __builtin_nan(x)
 
 
 __complex__ double
-__catan (__complex__ double x)
+_STD(catan) (__complex__ double x)
 {
   __complex__ double res;
@@ -83,7 +85,7 @@
   return res;
 }
-weak_alias (__catan, catan)
+/* w e a k _ a l i a s  (__catan, catan) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__catan, __catanl)
-weak_alias (__catan, catanl)
+/* w e a k _ a l i a s  (__catan, catanl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -26,5 +27,5 @@
 
 __complex__ float
-__catanf (__complex__ float x)
+_STD(catanf) (__complex__ float x)
 {
   __complex__ float res;
@@ -84,4 +85,4 @@
 }
 #ifndef __catanf
-weak_alias (__catanf, catanf)
+/* w e a k _ a l i a s  (__catanf, catanf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanh.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanh.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanh.c	(revision 2150)
@@ -19,6 +19,10 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
+
+#define __nan(x) __builtin_nan(x)
+
 
 #include "math_private.h"
@@ -26,5 +30,5 @@
 
 __complex__ double
-__catanh (__complex__ double x)
+_STD(catanh) (__complex__ double x)
 {
   __complex__ double res;
@@ -78,7 +82,7 @@
   return res;
 }
-weak_alias (__catanh, catanh)
+/* w e a k _ a l i a s  (__catanh, catanh) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__catanh, __catanhl)
-weak_alias (__catanh, catanhl)
+/* w e a k _ a l i a s  (__catanh, catanhl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanhf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanhf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanhf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -26,5 +27,5 @@
 
 __complex__ float
-__catanhf (__complex__ float x)
+_STD(catanhf) (__complex__ float x)
 {
   __complex__ float res;
@@ -79,4 +80,4 @@
 }
 #ifndef __catanhf
-weak_alias (__catanhf, catanhf)
+/* w e a k _ a l i a s  (__catanhf, catanhf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanhl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanhl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanhl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -26,5 +27,5 @@
 
 __complex__ long double
-__catanhl (__complex__ long double x)
+_STD(catanhl) (__complex__ long double x)
 {
   __complex__ long double res;
@@ -78,3 +79,3 @@
   return res;
 }
-weak_alias (__catanhl, catanhl)
+/* w e a k _ a l i a s  (__catanhl, catanhl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_catanl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -83,3 +84,3 @@
   return res;
 }
-weak_alias (__catanl, catanl)
+/* w e a k _ a l i a s  (__catanl, catanl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccos.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccos.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccos.c	(revision 2150)
@@ -19,11 +19,13 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
 #include <math.h>
+#define __nan(x) __builtin_nan(x)
 
 
 __complex__ double
-__ccos (__complex__ double x)
+_STD(ccos) (__complex__ double x)
 {
   __complex__ double res;
@@ -74,7 +76,7 @@
   return res;
 }
-weak_alias (__ccos, ccos)
+/* w e a k _ a l i a s  (__ccos, ccos) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__ccos, __ccosl)
-weak_alias (__ccos, ccosl)
+/* w e a k _ a l i a s  (__ccos, ccosl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -25,5 +26,5 @@
 
 __complex__ float
-__ccosf (__complex__ float x)
+_STD(ccosf) (__complex__ float x)
 {
   __complex__ float res;
@@ -75,4 +76,4 @@
 }
 #ifndef __ccosf
-weak_alias (__ccosf, ccosf)
+/* w e a k _ a l i a s  (__ccosf, ccosf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosh.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosh.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosh.c	(revision 2150)
@@ -19,7 +19,11 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
 #include <math.h>
+
+#define __nan(x) __builtin_nan(x)
+
 
 #include "math_private.h"
@@ -27,5 +31,5 @@
 
 __complex__ double
-__ccosh (__complex__ double x)
+_STD(ccosh) (__complex__ double x)
 {
   __complex__ double retval;
@@ -99,7 +103,7 @@
   return retval;
 }
-weak_alias (__ccosh, ccosh)
+/* w e a k _ a l i a s  (__ccosh, ccosh) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__ccosh, __ccoshl)
-weak_alias (__ccosh, ccoshl)
+/* w e a k _ a l i a s  (__ccosh, ccoshl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccoshf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccoshf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccoshf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ float
-__ccoshf (__complex__ float x)
+_STD(ccoshf) (__complex__ float x)
 {
   __complex__ float retval;
@@ -100,4 +101,4 @@
 }
 #ifndef __ccoshf
-weak_alias (__ccoshf, ccoshf)
+/* w e a k _ a l i a s  (__ccoshf, ccoshf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccoshl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccoshl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccoshl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ long double
-__ccoshl (__complex__ long double x)
+_STD(ccoshl) (__complex__ long double x)
 {
   __complex__ long double retval;
@@ -99,3 +100,3 @@
   return retval;
 }
-weak_alias (__ccoshl, ccoshl)
+/* w e a k _ a l i a s  (__ccoshl, ccoshl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ccosl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -25,5 +26,5 @@
 
 __complex__ long double
-__ccosl (__complex__ long double x)
+_STD(ccosl) (__complex__ long double x)
 {
   __complex__ long double res;
@@ -74,3 +75,3 @@
   return res;
 }
-weak_alias (__ccosl, ccosl)
+/* w e a k _ a l i a s  (__ccosl, ccosl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cexpf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cexpf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cexpf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ float
-__cexpf (__complex__ float x)
+_STD(cexpf) (__complex__ float x)
 {
   __complex__ float retval;
@@ -122,4 +123,4 @@
 }
 #ifndef __cexpf
-weak_alias (__cexpf, cexpf)
+/* w e a k _ a l i a s  (__cexpf, cexpf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cexpl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cexpl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cexpl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ long double
-__cexpl (__complex__ long double x)
+_STD(cexpl) (__complex__ long double x)
 {
   __complex__ long double retval;
@@ -121,3 +122,3 @@
   return retval;
 }
-weak_alias (__cexpl, cexpl)
+/* w e a k _ a l i a s  (__cexpl, cexpl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog.c	(revision 2150)
@@ -19,8 +19,10 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
 #include "math_private.h"
+#define __nan(x) __builtin_nan(x)
 
 
@@ -59,7 +61,7 @@
   return result;
 }
-weak_alias (__clog, clog)
+/* w e a k _ a l i a s  (__clog, clog) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__clog, __clogl)
-weak_alias (__clog, clogl)
+/* w e a k _ a l i a s  (__clog, clogl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10.c	(revision 2150)
@@ -19,6 +19,10 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
+
+#define __nan(x) __builtin_nan(x)
+
 
 #include "math_private.h"
@@ -26,5 +30,5 @@
 
 __complex__ double
-__clog10 (__complex__ double x)
+_STD(clog10) (__complex__ double x)
 {
   __complex__ double result;
@@ -59,7 +63,7 @@
   return result;
 }
-weak_alias (__clog10, clog10)
+/* w e a k _ a l i a s  (__clog10, clog10) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__clog10, __clog10l)
-weak_alias (__clog10, clog10l)
+/* w e a k _ a l i a s  (__clog10, clog10l) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10f.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10f.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10f.c	(revision 2150)
@@ -19,4 +19,5 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -26,5 +27,5 @@
 
 __complex__ float
-__clog10f (__complex__ float x)
+_STD(clog10f) (__complex__ float x)
 {
   __complex__ float result;
@@ -60,4 +61,4 @@
 }
 #ifndef __clog10f
-weak_alias (__clog10f, clog10f)
+/* w e a k _ a l i a s  (__clog10f, clog10f) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10l.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10l.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clog10l.c	(revision 2150)
@@ -19,4 +19,5 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -26,5 +27,5 @@
 
 __complex__ long double
-__clog10l (__complex__ long double x)
+_STD(clog10l) (__complex__ long double x)
 {
   __complex__ long double result;
@@ -59,3 +60,3 @@
   return result;
 }
-weak_alias (__clog10l, clog10l)
+/* w e a k _ a l i a s  (__clog10l, clog10l) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clogf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clogf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clogf.c	(revision 2150)
@@ -19,4 +19,5 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -60,4 +61,4 @@
 }
 #ifndef __clogf
-weak_alias (__clogf, clogf)
+/* w e a k _ a l i a s  (__clogf, clogf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clogl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clogl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_clogl.c	(revision 2150)
@@ -19,4 +19,5 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -59,3 +60,3 @@
   return result;
 }
-weak_alias (__clogl, clogl)
+/* w e a k _ a l i a s  (__clogl, clogl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpow.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpow.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpow.c	(revision 2150)
@@ -19,16 +19,20 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
+#define __nan(x) __builtin_nan(x)
+
+
 
 __complex__ double
-__cpow (__complex__ double x, __complex__ double c)
+_STD(cpow) (__complex__ double x, __complex__ double c)
 {
   return __cexp (c * __clog (x));
 }
-weak_alias (__cpow, cpow)
+/* w e a k _ a l i a s  (__cpow, cpow) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__cpow, __cpowl)
-weak_alias (__cpow, cpowl)
+/* w e a k _ a l i a s  (__cpow, cpowl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpowf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpowf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpowf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -24,9 +25,9 @@
 
 __complex__ float
-__cpowf (__complex__ float x, __complex__ float c)
+_STD(cpowf) (__complex__ float x, __complex__ float c)
 {
   return __cexpf (c * __clogf (x));
 }
 #ifndef __cpowf
-weak_alias (__cpowf, cpowf)
+/* w e a k _ a l i a s  (__cpowf, cpowf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpowl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpowl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cpowl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -24,7 +25,7 @@
 
 __complex__ long double
-__cpowl (__complex__ long double x, __complex__ long double c)
+_STD(cpowl) (__complex__ long double x, __complex__ long double c)
 {
   return __cexpl (c * __clogl (x));
 }
-weak_alias (__cpowl, cpowl)
+/* w e a k _ a l i a s  (__cpowl, cpowl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cproj.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cproj.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cproj.c	(revision 2150)
@@ -19,10 +19,14 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
 
+#define nan(x) __builtin_nan(x)
+
+
 
 __complex__ double
-__cproj (__complex__ double x)
+_STD(cproj) (__complex__ double x)
 {
   __complex__ double res;
@@ -45,7 +49,7 @@
   return res;
 }
-weak_alias (__cproj, cproj)
+/* w e a k _ a l i a s  (__cproj, cproj) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__cproj, __cprojl)
-weak_alias (__cproj, cprojl)
+/* w e a k _ a l i a s  (__cproj, cprojl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cprojf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cprojf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cprojf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -24,5 +25,5 @@
 
 __complex__ float
-__cprojf (__complex__ float x)
+_STD(cprojf) (__complex__ float x)
 {
   __complex__ float res;
@@ -46,4 +47,4 @@
 }
 #ifndef __cprojf
-weak_alias (__cprojf, cprojf)
+/* w e a k _ a l i a s  (__cprojf, cprojf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cprojl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cprojl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_cprojl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -24,5 +25,5 @@
 
 __complex__ long double
-__cprojl (__complex__ long double x)
+_STD(cprojl) (__complex__ long double x)
 {
   __complex__ long double res;
@@ -46,3 +47,3 @@
   return res;
 }
-weak_alias (__cprojl, cprojl)
+/* w e a k _ a l i a s  (__cprojl, cprojl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csin.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csin.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csin.c	(revision 2150)
@@ -19,7 +19,11 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
 #include <math.h>
+
+#define __nan(x) __builtin_nan(x)
+
 
 #include "math_private.h"
@@ -27,5 +31,5 @@
 
 __complex__ double
-__csin (__complex__ double x)
+_STD(csin) (__complex__ double x)
 {
   __complex__ double retval;
@@ -125,7 +129,7 @@
   return retval;
 }
-weak_alias (__csin, csin)
+/* w e a k _ a l i a s  (__csin, csin) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__csin, __csinl)
-weak_alias (__csin, csinl)
+/* w e a k _ a l i a s  (__csin, csinl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ float
-__csinf (__complex__ float x)
+_STD(csinf) (__complex__ float x)
 {
   __complex__ float retval;
@@ -126,4 +127,4 @@
 }
 #ifndef __csinf
-weak_alias (__csinf, csinf)
+/* w e a k _ a l i a s  (__csinf, csinf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinh.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinh.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinh.c	(revision 2150)
@@ -19,7 +19,11 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
 #include <math.h>
+
+#define __nan(x) __builtin_nan(x)
+
 
 #include "math_private.h"
@@ -27,5 +31,5 @@
 
 __complex__ double
-__csinh (__complex__ double x)
+_STD(csinh) (__complex__ double x)
 {
   __complex__ double retval;
@@ -120,7 +124,7 @@
   return retval;
 }
-weak_alias (__csinh, csinh)
+/* w e a k _ a l i a s  (__csinh, csinh) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__csinh, __csinhl)
-weak_alias (__csinh, csinhl)
+/* w e a k _ a l i a s  (__csinh, csinhl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinhf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinhf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinhf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ float
-__csinhf (__complex__ float x)
+_STD(csinhf) (__complex__ float x)
 {
   __complex__ float retval;
@@ -121,4 +122,4 @@
 }
 #ifndef __csinhf
-weak_alias (__csinhf, csinhf)
+/* w e a k _ a l i a s  (__csinhf, csinhf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinhl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinhl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinhl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ long double
-__csinhl (__complex__ long double x)
+_STD(csinhl) (__complex__ long double x)
 {
   __complex__ long double retval;
@@ -120,3 +121,3 @@
   return retval;
 }
-weak_alias (__csinhl, csinhl)
+/* w e a k _ a l i a s  (__csinhl, csinhl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csinl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ long double
-__csinl (__complex__ long double x)
+_STD(csinl) (__complex__ long double x)
 {
   __complex__ long double retval;
@@ -125,3 +126,3 @@
   return retval;
 }
-weak_alias (__csinl, csinl)
+/* w e a k _ a l i a s  (__csinl, csinl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrt.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrt.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrt.c	(revision 2150)
@@ -20,6 +20,10 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
+
+#define __nan(x) __builtin_nan(x)
+
 
 #include "math_private.h"
@@ -27,5 +31,5 @@
 
 __complex__ double
-__csqrt (__complex__ double x)
+_STD(csqrt) (__complex__ double x)
 {
   __complex__ double res;
@@ -108,7 +112,7 @@
   return res;
 }
-weak_alias (__csqrt, csqrt)
+/* w e a k _ a l i a s  (__csqrt, csqrt) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__csqrt, __csqrtl)
-weak_alias (__csqrt, csqrtl)
+/* w e a k _ a l i a s  (__csqrt, csqrtl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrtf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrtf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrtf.c	(revision 2150)
@@ -18,6 +18,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -27,5 +28,5 @@
 
 __complex__ float
-__csqrtf (__complex__ float x)
+_STD(csqrtf) (__complex__ float x)
 {
   __complex__ float res;
@@ -109,4 +110,4 @@
 }
 #ifndef __csqrtf
-weak_alias (__csqrtf, csqrtf)
+/* w e a k _ a l i a s  (__csqrtf, csqrtf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrtl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrtl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_csqrtl.c	(revision 2150)
@@ -18,6 +18,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <math.h>
@@ -27,5 +28,5 @@
 
 __complex__ long double
-__csqrtl (__complex__ long double x)
+_STD(csqrtl) (__complex__ long double x)
 {
   __complex__ long double res;
@@ -108,3 +109,3 @@
   return res;
 }
-weak_alias (__csqrtl, csqrtl)
+/* w e a k _ a l i a s  (__csqrtl, csqrtl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctan.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctan.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctan.c	(revision 2150)
@@ -19,4 +19,5 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -24,8 +25,8 @@
 
 #include "math_private.h"
-
+#define __nan __builtin_nan
 
 __complex__ double
-__ctan (__complex__ double x)
+_STD(ctan) (__complex__ double x)
 {
   __complex__ double res;
@@ -68,7 +69,7 @@
   return res;
 }
-weak_alias (__ctan, ctan)
+/* w e a k _ a l i a s  (__ctan, ctan) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__ctan, __ctanl)
-weak_alias (__ctan, ctanl)
+/* w e a k _ a l i a s  (__ctan, ctanl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ float
-__ctanf (__complex__ float x)
+_STD(ctanf) (__complex__ float x)
 {
   __complex__ float res;
@@ -69,4 +70,4 @@
 }
 #ifndef __ctanf
-weak_alias (__ctanf, ctanf)
+/* w e a k _ a l i a s  (__ctanf, ctanf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanh.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanh.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanh.c	(revision 2150)
@@ -19,4 +19,5 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -24,8 +25,9 @@
 
 #include "math_private.h"
+#define __nan __builtin_nan
 
 
 __complex__ double
-__ctanh (__complex__ double x)
+_STD(ctanh) (__complex__ double x)
 {
   __complex__ double res;
@@ -68,7 +70,7 @@
   return res;
 }
-weak_alias (__ctanh, ctanh)
+/* w e a k _ a l i a s  (__ctanh, ctanh) */
 #ifdef NO_LONG_DOUBLE
 strong_alias (__ctanh, __ctanhl)
-weak_alias (__ctanh, ctanhl)
+/* w e a k _ a l i a s  (__ctanh, ctanhl) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanhf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanhf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanhf.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ float
-__ctanhf (__complex__ float x)
+_STD(ctanhf) (__complex__ float x)
 {
   __complex__ float res;
@@ -69,4 +70,4 @@
 }
 #ifndef __ctanhf
-weak_alias (__ctanhf, ctanhf)
+/* w e a k _ a l i a s  (__ctanhf, ctanhf) */
 #endif
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanhl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanhl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanhl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ long double
-__ctanhl (__complex__ long double x)
+_STD(ctanhl) (__complex__ long double x)
 {
   __complex__ long double res;
@@ -68,3 +69,3 @@
   return res;
 }
-weak_alias (__ctanhl, ctanhl)
+/* w e a k _ a l i a s  (__ctanhl, ctanhl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_ctanl.c	(revision 2150)
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   02111-1307 USA.   */
 
+#include "libc-alias-glibc.h"
 #include <complex.h>
 #include <fenv.h>
@@ -27,5 +28,5 @@
 
 __complex__ long double
-__ctanl (__complex__ long double x)
+_STD(ctanl) (__complex__ long double x)
 {
   __complex__ long double res;
@@ -68,3 +69,3 @@
   return res;
 }
-weak_alias (__ctanl, ctanl)
+/* w e a k _ a l i a s  (__ctanl, ctanl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_erfl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_erfl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/s_erfl.c	(revision 2150)
@@ -1,2 +1,3 @@
+#include "libc-alias-glibc.h"
 #include <math.h>
 #include <stdio.h>
@@ -4,23 +5,23 @@
 
 long double
-__erfl (long double x)
+_STD(erfl) (long double x)
 {
   fputs ("__erfl not implemented\n", stderr);
-  __set_errno (ENOSYS);
+  errno = ENOSYS;
   return 0.0;
 }
-weak_alias (__erfl, erfl)
+/* w e a k _ a l i a s (__erfl, erfl) */
 
-stub_warning (erfl)
+//stub_warning (erfl)
 
 long double
-__erfcl (long double x)
+_STD(erfcl) (long double x)
 {
   fputs ("__erfcl not implemented\n", stderr);
-  __set_errno (ENOSYS);
+  errno = ENOSYS;
   return 0.0;
 }
-weak_alias (__erfcl, erfcl)
+/* w e a k _ a l i a s (__erfcl, erfcl) */
 
-stub_warning (erfcl)
-#include <stub-tag.h>
+//stub_warning (erfcl)
+//#include <stub-tag.h>
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_lgammal.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_lgammal.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_lgammal.c	(revision 2150)
@@ -15,4 +15,5 @@
  */
 
+#include "libc-alias-glibc.h"
 #if defined(LIBM_SCCS) && !defined(lint)
 static char rcsid[] = "$NetBSD: $";
@@ -35,5 +36,5 @@
 #endif
 {
-#ifdef _IEEE_LIBM
+#if defined _IEEE_LIBM || defined __INNOTEK_LIBC__
 	return __ieee754_lgammal_r(x,&signgam);
 #else
@@ -54,5 +55,5 @@
 #endif
 }
-weak_alias (__lgammal, lgammal)
-strong_alias (__lgammal, __gammal)
-weak_alias (__gammal, gammal)
+/* w e a k _alias (__lgammal, lgammal) */
+strong_alias (_std_lgammal, _std_gammal)
+/* w e a k _alias (__gammal, gammal) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_tgammaf.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_tgammaf.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_tgammaf.c	(revision 2150)
@@ -18,11 +18,13 @@
 #endif
 
+#include "libc-alias-glibc.h"
+#include <math.h>
 #include "math.h"
 #include "math_private.h"
 
 #ifdef __STDC__
-	float __tgammaf(float x)
+	float _STD(tgammaf)(float x)
 #else
-	float __tgammaf(x)
+	float _STD(tgammaf)(x)
 	float x;
 #endif
@@ -32,5 +34,5 @@
 	y = __ieee754_gammaf_r(x,&local_signgam);
 	if (local_signgam < 0) y = -y;
-#ifdef _IEEE_LIBM
+#if defined _IEEE_LIBM || defined __INNOTEK_LIBC__
 	return y;
 #else
Index: trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_tgammal.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_tgammal.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/generic/w_tgammal.c	(revision 2150)
@@ -23,11 +23,13 @@
  */
 
+#include "libc-alias-glibc.h"
+#define __ieee754_gammal_r gammal_r
 #include "math.h"
 #include "math_private.h"
 
 #ifdef __STDC__
-	long double __tgammal(long double x)
+	long double _STD(tgammal)(long double x)
 #else
-	long double __tgammal(x)
+	long double _STD(tgammal)(x)
 	long double x;
 #endif
@@ -37,5 +39,5 @@
 	y = __ieee754_gammal_r(x,&local_signgam);
 	if (local_signgam < 0) y = -y;
-#ifdef _IEEE_LIBM
+#if defined _IEEE_LIBM || defined __INNOTEK_LIBC__
 	return y;
 #else
@@ -53,3 +55,3 @@
 #endif
 }
-weak_alias (__tgammal, tgammal)
+/*  w e a k _ a l i a s (__tgammal, tgammal) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_atan2l.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_atan2l.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_atan2l.c	(revision 2150)
@@ -6,8 +6,10 @@
  */
 
+#include "libc-alias-glibc.h"
+#include <math.h>
 #include <math_private.h>
 
 long double
-__ieee754_atan2l (long double y, long double x)
+_STD(atan2l) (long double y, long double x)
 {
   long double res;
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_atanhl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_atanhl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_atanhl.S	(revision 2150)
@@ -19,5 +19,7 @@
    02111-1307 USA.  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 #ifdef __ELF__
@@ -55,5 +57,5 @@
 
 	.text
-ENTRY(__ieee754_atanhl)
+ENTRY(_STD(atanhl))
 	movl	12(%esp), %ecx
 
@@ -118,3 +120,3 @@
 6:	fldt	4(%esp)
 	ret
-END(__ieee754_atanhl)
+END(_STD(atanhl))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10.S	(revision 2150)
@@ -3,8 +3,10 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 /* 10^x = 2^(x * log2(10)) */
-ENTRY(__ieee754_exp10)
+ENTRY(_STD(exp10))
 	fldl	4(%esp)
 /* I added the following ugly construct because exp(+-Inf) resulted
@@ -36,3 +38,3 @@
 	fldz				/* Set result to 0.  */
 2:	ret
-END (__ieee754_exp10)
+END (_STD(exp10))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10f.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10f.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10f.S	(revision 2150)
@@ -3,8 +3,11 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
+
 
 /* e^x = 2^(x * log2(10)) */
-ENTRY(__ieee754_exp10f)
+ENTRY(_STD(exp10f))
 	flds	4(%esp)
 /* I added the following ugly construct because exp(+-Inf) resulted
@@ -36,3 +39,3 @@
 	fldz				/* Set result to 0.  */
 2:	ret
-END (__ieee754_exp10f)
+END (_STD(exp10f))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10l.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10l.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp10l.S	(revision 2150)
@@ -3,8 +3,10 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 /* e^x = 2^(x * log2l(10)) */
-ENTRY(__ieee754_exp10l)
+ENTRY(_STD(exp10l))
 	fldt	4(%esp)
 /* I added the following ugly construct because expl(+-Inf) resulted
@@ -36,3 +38,3 @@
 	fldz				/* Set result to 0.  */
 2:	ret
-END (__ieee754_exp10l)
+END (_STD(exp10l))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp2l.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp2l.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_exp2l.S	(revision 2150)
@@ -5,7 +5,9 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
-ENTRY(__ieee754_exp2l)
+ENTRY(_STD(exp2l))
 	fldt	4(%esp)
 /* I added the following ugly construct because exp(+-Inf) resulted
@@ -35,3 +37,3 @@
 	fldz				/* Set result to 0.  */
 2:	ret
-END (__ieee754_exp2l)
+END (_STD(exp2l))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_fmodl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_fmodl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_fmodl.c	(revision 2150)
@@ -6,8 +6,10 @@
  */
 
+#include "libc-alias-glibc.h"
+#include <math.h>
 #include <math_private.h>
 
 long double
-__ieee754_fmodl (long double x, long double y)
+_STD(fmodl) (long double x, long double y)
 {
   long double res;
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log10l.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log10l.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log10l.S	(revision 2150)
@@ -8,7 +8,9 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
-RCSID("$NetBSD: $")
+//RCSID("$NetBSD: $")
 
 #ifdef __ELF__
@@ -36,5 +38,5 @@
 
 	.text
-ENTRY(__ieee754_log10l)
+ENTRY(_STD(log10l))
 	fldlg2			// log10(2)
 	fldt	4(%esp)		// x : log10(2)
@@ -66,3 +68,3 @@
 	fstp	%st(1)
 	ret
-END(__ieee754_log10l)
+END(_STD(log10l))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2.S	(revision 2150)
@@ -7,5 +7,7 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 #ifdef __ELF__
@@ -33,5 +35,5 @@
 
 	.text
-ENTRY(__ieee754_log2)
+ENTRY(_STD(log2))
 #ifdef PIC
 	LOAD_PIC_REG (dx)
@@ -63,3 +65,3 @@
 	fstp	%st(1)
 	ret
-END (__ieee754_log2)
+END (_STD(log2))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2f.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2f.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2f.S	(revision 2150)
@@ -7,5 +7,7 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 #ifdef __ELF__
@@ -33,5 +35,5 @@
 
 	.text
-ENTRY(__ieee754_log2f)
+ENTRY(_STD(log2f))
 #ifdef PIC
 	LOAD_PIC_REG (dx)
@@ -63,3 +65,3 @@
 	fstp	%st(1)
 	ret
-END (__ieee754_log2f)
+END (_STD(log2f))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2l.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2l.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_log2l.S	(revision 2150)
@@ -7,5 +7,7 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 #ifdef __ELF__
@@ -33,5 +35,5 @@
 
 	.text
-ENTRY(__ieee754_log2l)
+ENTRY(_STD(log2l))
 #ifdef PIC
 	LOAD_PIC_REG (dx)
@@ -63,3 +65,3 @@
 	fstp	%st(1)
 	ret
-END (__ieee754_log2l)
+END (_STD(log2l))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_logl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_logl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_logl.S	(revision 2150)
@@ -6,7 +6,9 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
-RCSID("$NetBSD: $")
+//RCSID("$NetBSD: $")
 
 
@@ -35,5 +37,5 @@
 
 	.text
-ENTRY(__ieee754_logl)
+ENTRY(_STD(logl))
 	fldln2			// log(2)
 	fldt	4(%esp)		// x : log(2)
@@ -56,3 +58,3 @@
 	fyl2x			// log(x)
 	ret
-END (__ieee754_logl)
+END (_STD(logl))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_powl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_powl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_powl.S	(revision 2150)
@@ -20,5 +20,7 @@
    02111-1307 USA.  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 #ifdef __ELF__
@@ -63,5 +65,5 @@
 
 	.text
-ENTRY(__ieee754_powl)
+ENTRY(_STD(powl))
 	fldt	16(%esp)	// y
 	fxam
@@ -358,3 +360,3 @@
 	ret
 
-END(__ieee754_powl)
+END(_STD(powl))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_remainderl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_remainderl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_remainderl.S	(revision 2150)
@@ -6,9 +6,11 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
-RCSID("$NetBSD: $")
+//RCSID("$NetBSD: $")
 
-ENTRY(__ieee754_remainderl)
+ENTRY(_STD(remainderl))
 	fldt	16(%esp)
 	fldt	4(%esp)
@@ -19,3 +21,3 @@
 	fstp	%st(1)
 	ret
-END (__ieee754_remainderl)
+END (_STD(remainderl))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_scalbl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_scalbl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_scalbl.S	(revision 2150)
@@ -8,7 +8,9 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
-RCSID("$NetBSD: $")
+//RCSID("$NetBSD: $")
 
 #ifdef __ELF__
@@ -38,5 +40,5 @@
 
 	.text
-ENTRY(__ieee754_scalbl)
+ENTRY(_STD(scalbl))
 	fldt	16(%esp)
 	fxam
@@ -102,3 +104,3 @@
 	fdiv	%st
 	ret
-END(__ieee754_scalbl)
+END(_STD(scalbl))
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_sqrtl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_sqrtl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/e_sqrtl.c	(revision 2150)
@@ -6,8 +6,10 @@
  */
 
+#include "libc-alias-glibc.h"
+#include <math.h>
 #include <math_private.h>
 
 long double
-__ieee754_sqrtl (long double x)
+_STD(sqrtl) (long double x)
 {
   long double res;
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_asinhl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_asinhl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_asinhl.S	(revision 2150)
@@ -19,5 +19,7 @@
    02111-1307 USA.  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 #ifdef __ELF__
@@ -52,5 +54,5 @@
 
 	.text
-ENTRY(__asinhl)
+ENTRY(_STD(asinhl))
 	movl	12(%esp), %ecx
 	movl	$0x7fff, %eax
@@ -140,4 +142,4 @@
 	fchs
 4:	ret
-END(__asinhl)
-weak_alias (__asinhl, asinhl)
+END(_STD(asinhl))
+/* w e a k _ a l i a s  (__asinhl, asinhl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_atanl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_atanl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_atanl.c	(revision 2150)
@@ -6,8 +6,10 @@
  */
 
+#include "libc-alias-glibc.h"
+#include <math.h>
 #include <math_private.h>
 
 long double
-__atanl (long double x)
+_STD(atanl) (long double x)
 {
   long double res;
@@ -20,3 +22,3 @@
 }
 
-weak_alias (__atanl, atanl)
+/*  w e a k _ a l i a s (__atanl, atanl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_cexp.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_cexp.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_cexp.S	(revision 2150)
@@ -66,5 +66,5 @@
 
 	.text
-ENTRY(__cexp)
+ENTRY(_STD(cexp))
 	fldl	8(%esp)			/* x */
 	fxam
@@ -254,4 +254,4 @@
 	ret	$4
 
-END(__cexp)
-weak_alias (__cexp, cexp)
+END(_STD(cexp))
+/* w e a k _ a l i a s (__cexp, cexp) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_expm1l.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_expm1l.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_expm1l.S	(revision 2150)
@@ -23,5 +23,7 @@
 	/* Using: e^x - 1 = 2^(x * log2(e)) - 1 */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
 #ifdef __ELF__
@@ -48,5 +50,5 @@
 
 	.text
-ENTRY(__expm1l)
+ENTRY(_STD(expm1l))
 	fldt	4(%esp)		// x
 	fxam			// Is NaN or +-Inf?
@@ -83,5 +85,5 @@
 	fldl	MO(minus1)	// Set result to -1.0.
 3:	ret
-END(__expm1l)
-libm_hidden_def (__expm1l)
-weak_alias (__expm1l, expm1l)
+END(_STD(expm1l))
+/*libm_hidden_def(__expm1l) */
+/* w  e a k _ a l i a s  (__expm1l, expm1l) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_llrintl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_llrintl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_llrintl.S	(revision 2150)
@@ -23,5 +23,5 @@
 
 	.text
-ENTRY(__llrintl)
+ENTRY(_STD(llrintl))
 	fldt	4(%esp)
 	subl	$8, %esp
@@ -34,4 +34,4 @@
 	cfi_adjust_cfa_offset (-4)
 	ret
-END(__llrintl)
-weak_alias (__llrintl, llrintl)
+END(_STD(llrintl))
+/* w e a k _ a l i a s  (__llrintl, llrintl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_log1pl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_log1pl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_log1pl.S	(revision 2150)
@@ -6,7 +6,9 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
-RCSID("$NetBSD: s_log1p.S,v 1.7 1995/05/09 00:10:58 jtc Exp $")
+//RCSID("$NetBSD: s_log1p.S,v 1.7 1995/05/09 00:10:58 jtc Exp $")
 
 #ifdef __ELF__
@@ -31,5 +33,5 @@
  */
 	.text
-ENTRY(__log1pl)
+ENTRY(_STD(log1pl))
 	fldln2
 
@@ -73,4 +75,4 @@
 	ret
 
-END (__log1pl)
-weak_alias (__log1pl, log1pl)
+END (_STD(log1pl))
+/* w e a k _ a l i a s (__log1pl, log1pl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_logbl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_logbl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_logbl.c	(revision 2150)
@@ -5,8 +5,10 @@
  */
 
+#include "libc-alias-glibc.h"
+#include <math.h>
 #include <math_private.h>
 
 long double
-__logbl (long double x)
+_STD(logbl) (long double x)
 {
   long double res;
@@ -17,3 +19,3 @@
 }
 
-weak_alias (__logbl, logbl)
+/*  w e a k _ a l i a s (__logbl, logbl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_lrintl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_lrintl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_lrintl.S	(revision 2150)
@@ -23,5 +23,5 @@
 
 	.text
-ENTRY(__lrintl)
+ENTRY(_STD(lrintl))
 	fldt	4(%esp)
 	subl	$4, %esp
@@ -32,4 +32,4 @@
 	cfi_adjust_cfa_offset (-4)
 	ret
-END(__lrintl)
-weak_alias (__lrintl, lrintl)
+END(_STD(lrintl))
+/* w e a k _ a l i a s  (__lrintl, lrintl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_nearbyintl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_nearbyintl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_nearbyintl.S	(revision 2150)
@@ -5,7 +5,9 @@
 /* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>.  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 
-ENTRY(__nearbyintl)
+ENTRY(_STD(nearbyintl))
 	fldt	4(%esp)
 	pushl	%eax
@@ -26,4 +28,4 @@
 	cfi_adjust_cfa_offset (-4)
 	ret
-END (__nearbyintl)
-weak_alias (__nearbyintl, nearbyintl)
+END (_STD(nearbyintl))
+/*  w e a k _ a l i a s (__nearbyintl, nearbyintl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_remquol.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_remquol.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_remquol.S	(revision 2150)
@@ -5,5 +5,7 @@
  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 #include "bp-sym.h"
 #include "bp-asm.h"
@@ -15,5 +17,5 @@
 
 	.text
-ENTRY (BP_SYM (__remquol))
+ENTRY (BP_SYM (_STD(remquol)))
 	ENTER
 
@@ -47,4 +49,4 @@
 	LEAVE
 	ret
-END (BP_SYM (__remquol))
-weak_alias (BP_SYM (__remquol), BP_SYM (remquol))
+END (BP_SYM (_STD(remquol)))
+/*  w e a k _ a l i a s (BP_SYM (__remquol), BP_SYM (remquol)) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_rintl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_rintl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_rintl.c	(revision 2150)
@@ -5,8 +5,10 @@
  */
 
+#include "libc-alias-glibc.h"
+#include <math.h>
 #include <math_private.h>
 
 long double
-__rintl (long double x)
+_STD(rintl) (long double x)
 {
   long double res;
@@ -16,3 +18,3 @@
 }
 
-weak_alias (__rintl, rintl)
+/*  w e a k _ a l i a s (__rintl, rintl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_significandl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_significandl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_significandl.c	(revision 2150)
@@ -5,8 +5,10 @@
  */
 
+#include "libc-alias-glibc.h"
+#include <math.h>
 #include <math_private.h>
 
 long double
-__significandl (long double x)
+_STD(significandl) (long double x)
 {
   long double res;
@@ -17,3 +19,3 @@
 }
 
-weak_alias (__significandl, significandl)
+/*  w e a k _alias (__significandl, significandl) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincos.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincos.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincos.S	(revision 2150)
@@ -19,5 +19,7 @@
    02111-1307 USA.  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 #include "bp-sym.h"
 #include "bp-asm.h"
@@ -29,5 +31,5 @@
 
 	.text
-ENTRY (BP_SYM (__sincos))
+ENTRY (BP_SYM (_STD(sincos)))
 	ENTER
 
@@ -62,4 +64,4 @@
 	LEAVE
 	ret
-END (BP_SYM (__sincos))
-weak_alias (BP_SYM (__sincos), BP_SYM (sincos))
+END (BP_SYM (_STD(sincos)))
+/*  w e a k _ a l i a s  (BP_SYM (__sincos), BP_SYM (sincos)) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincosf.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincosf.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincosf.S	(revision 2150)
@@ -19,5 +19,7 @@
    02111-1307 USA.  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 #include "bp-sym.h"
 #include "bp-asm.h"
@@ -29,5 +31,5 @@
 
 	.text
-ENTRY (BP_SYM (__sincosf))
+ENTRY (BP_SYM (_STD(sincosf)))
 	ENTER
 
@@ -62,4 +64,4 @@
 	LEAVE
 	ret
-END (BP_SYM (__sincosf))
-weak_alias (BP_SYM (__sincosf), BP_SYM (sincosf))
+END (BP_SYM (_STD(sincosf)))
+/* w e a k _ a l i a s (BP_SYM (__sincosf), BP_SYM (sincosf)) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincosl.S
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincosl.S	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/fpu/s_sincosl.S	(revision 2150)
@@ -19,5 +19,7 @@
    02111-1307 USA.  */
 
-#include <machine/asm.h>
+//#include <machine/asm.h>
+#include <sysdep.h>
+#include <asm-syntax.h>
 #include "bp-sym.h"
 #include "bp-asm.h"
@@ -29,5 +31,5 @@
 
 	.text
-ENTRY (BP_SYM (__sincosl))
+ENTRY (BP_SYM (_STD(sincosl)))
 	ENTER
 
@@ -62,4 +64,4 @@
 	LEAVE
 	ret
-END (BP_SYM (__sincosl))
-weak_alias (BP_SYM (__sincosl), BP_SYM (sincosl))
+END (BP_SYM (_STD(sincosl)))
+/* w e a k _ a l i a s  (BP_SYM (__sincosl), BP_SYM (sincosl)) */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/i386/sysdep.h
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/i386/sysdep.h	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/i386/sysdep.h	(revision 2150)
@@ -21,4 +21,6 @@
 
 #ifdef	__ASSEMBLER__
+#undef _STD
+#define _STD(x) _std_ ## x
 
 /* Syntactic details of assembler.  */
Index: trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_acoshl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_acoshl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_acoshl.c	(revision 2150)
@@ -15,4 +15,5 @@
  */
 
+#include "libc-alias-glibc.h"
 #if defined(LIBM_SCCS) && !defined(lint)
 static char rcsid[] = "$NetBSD: $";
Index: trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_gammal_r.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_gammal_r.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_gammal_r.c	(revision 2150)
@@ -19,6 +19,7 @@
    02111-1307 USA.  */
 
+#include "libc-alias-glibc.h"
 #include <math.h>
-#include <math_private.h>
+#include "math_private.h"
 
 
Index: trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_j0l.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_j0l.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_j0l.c	(revision 2150)
@@ -12,7 +12,7 @@
 /* Long double expansions are
   Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
-  and are incorporated herein by permission of the author.  The author 
+  and are incorporated herein by permission of the author.  The author
   reserves the right to distribute this material elsewhere under different
-  copying permissions.  These modifications are distributed here under 
+  copying permissions.  These modifications are distributed here under
   the following terms:
 
@@ -72,4 +72,5 @@
  */
 
+#include "libc-alias-glibc.h"
 #include "math.h"
 #include "math_private.h"
Index: trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_j1l.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_j1l.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_j1l.c	(revision 2150)
@@ -12,7 +12,7 @@
 /* Long double expansions are
   Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
-  and are incorporated herein by permission of the author.  The author 
+  and are incorporated herein by permission of the author.  The author
   reserves the right to distribute this material elsewhere under different
-  copying permissions.  These modifications are distributed here under 
+  copying permissions.  These modifications are distributed here under
   the following terms:
 
@@ -72,4 +72,5 @@
  */
 
+#include "libc-alias-glibc.h"
 #include "math.h"
 #include "math_private.h"
Index: trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_jnl.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_jnl.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_jnl.c	(revision 2150)
@@ -12,7 +12,7 @@
 /* Modifications for long double are
   Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
-  and are incorporated herein by permission of the author.  The author 
+  and are incorporated herein by permission of the author.  The author
   reserves the right to distribute this material elsewhere under different
-  copying permissions.  These modifications are distributed here under 
+  copying permissions.  These modifications are distributed here under
   the following terms:
 
@@ -57,4 +57,5 @@
  */
 
+#include "libc-alias-glibc.h"
 #include "math.h"
 #include "math_private.h"
Index: trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_lgammal_r.c
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_lgammal_r.c	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/e_lgammal_r.c	(revision 2150)
@@ -12,7 +12,7 @@
 /* Long double expansions are
   Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
-  and are incorporated herein by permission of the author.  The author 
+  and are incorporated herein by permission of the author.  The author
   reserves the right to distribute this material elsewhere under different
-  copying permissions.  These modifications are distributed here under 
+  copying permissions.  These modifications are distributed here under
   the following terms:
 
@@ -92,4 +92,5 @@
  */
 
+#include "libc-alias-glibc.h"
 #include "math.h"
 #include "math_private.h"
Index: trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/math_private.h
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/math_private.h	(revision 2150)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/ieee754/ldbl-96/math_private.h	(revision 2150)
@@ -0,0 +1,3 @@
+#include <endian.h>
+#include "../../../../msun/src/math_private.h"
+#include "math_ldbl.h"
Index: trunk/src/emx/src/lib/lgpl/sysdeps/sysdeps.smak
===================================================================
--- trunk/src/emx/src/lib/lgpl/sysdeps/sysdeps.smak	(revision 2147)
+++ trunk/src/emx/src/lib/lgpl/sysdeps/sysdeps.smak	(revision 2150)
@@ -1,2 +1,6 @@
 libc.TSRC += $(wildcard src/lib/lgpl/sysdeps/os2/*.c) \
-	$(wildcard src/lib/lgpl/sysdeps/i386/*.S)
+	$(wildcard src/lib/lgpl/sysdeps/i386/*.S) \
+	$(wildcard src/lib/lgpl/sysdeps/i386/fpu/*.S) \
+	$(wildcard src/lib/lgpl/sysdeps/i386/fpu/*.c) \
+	$(wildcard src/lib/lgpl/sysdeps/generic/*.c) \
+	$(wildcard src/lib/lgpl/sysdeps/ieee754/ldbl-96/*.c)
Index: trunk/src/emx/src/lib/libc.def
===================================================================
--- trunk/src/emx/src/lib/libc.def	(revision 2147)
+++ trunk/src/emx/src/lib/libc.def	(revision 2150)
@@ -1665,25 +1665,25 @@
     "___fpclassifyf" @1669
     "___fpclassifyl" @1670
-    "_drem" @1671
-    "_dremf" @1672
+    "__std_drem" @1671
+    "__std_dremf" @1672
     "___exp__D" @1673
     "___fe_dfl_env" @1674
     "___fedisableexcept" @1675
     "___feenableexcept" @1676
-    "_finite" @1677
-    "_finitef" @1678
-    "_gamma" @1679
-    "_gammaf" @1680
-    "_gammaf_r" @1681
-    "_gamma_r" @1682
+    "__std_finite" @1677
+    "__std_finitef" @1678
+    "__std_gamma" @1679
+    "__std_gammaf" @1680
+    "__std_gammaf_r" @1681
+    "__std_gamma_r" @1682
     "___has_sse" @1683
     "___ieee754_rem_pio2" @1684
     "___ieee754_rem_pio2f" @1685
-    "_j0" @1686
-    "_j0f" @1687
-    "_j1" @1688
-    "_j1f" @1689
-    "_jn" @1690
-    "_jnf" @1691
+    "__std_j0" @1686
+    "__std_j0f" @1687
+    "__std_j1" @1688
+    "__std_j1f" @1689
+    "__std_jn" @1690
+    "__std_jnf" @1691
     "___kernel_cos" @1692
     "___kernel_cosf" @1693
@@ -1694,18 +1694,18 @@
     "___kernel_tan" @1698
     "___kernel_tanf" @1699
-    "_lgammaf_r" @1700
-    "_lgamma_r" @1701
+    "__std_lgammaf_r" @1700
+    "__std_lgamma_r" @1701
     "___log__D" @1702
-    "_scalb" @1703
-    "_significand" @1704
-    "_significandf" @1705
+    "__std_scalb" @1703
+    "__std_significand" @1704
+    "__std_significandf" @1705
     "__std_powl" @1706
     "___test_sse" @1707
-    "_y0" @1708
-    "_y0f" @1709
-    "_y1" @1710
-    "_y1f" @1711
-    "_yn" @1712
-    "_ynf" @1713
+    "__std_y0" @1708
+    "__std_y0f" @1709
+    "__std_y1" @1710
+    "__std_y1f" @1711
+    "__std_yn" @1712
+    "__std_ynf" @1713
     "_z_abs" @1714
     "___flt_rounds" @1715
@@ -1783,2 +1783,100 @@
     "___option_is_end" @1784
     "___option_is_short" @1785
+    ; getting more math stuff from glibc...
+    "__std_cacos" @1786
+    "__std_cacosf" @1787
+    "__std_cacosh" @1788
+    "__std_cacoshf" @1789
+    "__std_cacoshl" @1790
+    "__std_cacosl" @1791
+    "__std_cargf" @1792
+    "__std_casin" @1793
+    "__std_casinf" @1794
+    "__std_casinh" @1795
+    "__std_casinhf" @1796
+    "__std_casinhl" @1797
+    "__std_casinl" @1798
+    "__std_catan" @1799
+    "__std_catanf" @1800
+    "__std_catanh" @1801
+    "__std_catanhf" @1802
+    "__std_catanhl" @1803
+    "__std_catanl" @1804
+    "__std_ccos" @1805
+    "__std_ccosf" @1806
+    "__std_ccosh" @1807
+    "__std_ccoshf" @1808
+    "__std_ccoshl" @1809
+    "__std_ccosl" @1810
+    "__std_cexp" @1811
+    "__std_cexpf" @1812
+    "__std_cexpl" @1813
+    "__std_clog" @1814
+    "__std_clog10" @1815
+    "__std_clog10f" @1816
+    "__std_clog10l" @1817
+    "__std_clogf" @1818
+    "__std_clogl" @1819
+    "__std_cpow" @1820
+    "__std_cpowf" @1821
+    "__std_cpowl" @1822
+    "__std_cproj" @1823
+    "__std_cprojf" @1824
+    "__std_cprojl" @1825
+    "__std_csin" @1826
+    "__std_csinf" @1827
+    "__std_csinh" @1828
+    "__std_csinhf" @1829
+    "__std_csinhl" @1830
+    "__std_csinl" @1831
+    "__std_csqrt" @1832
+    "__std_csqrtf" @1833
+    "__std_csqrtl" @1834
+    "__std_ctan" @1835
+    "__std_ctanf" @1836
+    "__std_ctanh" @1837
+    "__std_ctanhf" @1838
+    "__std_ctanhl" @1839
+    "__std_ctanl" @1840
+    "__std_exp10" @1841
+    "__std_log2" @1842
+    "__std_log2f" @1843
+    "__std_log2l" @1844
+    "__std_sincos" @1845
+    "__std_sincosf" @1846
+    "__std_sincosl" @1847
+    "__std_asinhl" @1848
+    "__std_atanhl" @1849
+    "__std_llrintl" @1850
+    "__std_lrintl" @1851
+    "__std_erfcl" @1852
+    "__std_erfl" @1853
+    "__std_exp2l" @1854
+    "__std_expm1l" @1855
+    "__std_log1pl" @1856
+    "__std_logbl" @1857
+    "__std_nearbyintl" @1858
+    "__std_remainderl" @1859
+    "__std_remquol" @1860
+    "__std_cabsl" @1861
+    "__std_carg" @1862
+    "__std_cargl" @1863
+    "__std_gammal_r" @1864
+    "__std_exp10f" @1865
+    "__std_tgammaf" @1866
+    "__std_tgammal" @1867
+    "___fpu_control" @1868
+    "__std_acoshl" @1869
+    "__std_exp10l" @1870
+    "__std_j0l" @1872
+    "__std_j1l" @1873
+    "__std_jnl" @1874
+    "__std_lgammal_r" @1875
+    "__std_nexttowardl" @1876
+    "__std_scalbl" @1877
+    "__std_significandl" @1878
+    "__std_y0l" @1879
+    "__std_y1l" @1880
+    "__std_ynl" @1881
+    "__std_gammal" @1882
+    "__std_lgammal" @1883
Index: trunk/src/emx/src/lib/libc.smak
===================================================================
--- trunk/src/emx/src/lib/libc.smak	(revision 2147)
+++ trunk/src/emx/src/lib/libc.smak	(revision 2150)
@@ -418,8 +418,21 @@
 # files for _STD() macros invocations. Fortunately, gawk rulez forever thus
 # this happens in just a fraction of second.
-$.stmp-libc-std: $(wildcard src/lib/*/*.c src/lib/*/386/*.s src/lib/msun/*/*.c src/lib/msun/*/*.S \
-                            src/lib/bsd/*/*.c src/lib/bsd/*/glue/*.c src/lib/lgpl/*/*.c \
-							src/lib/lgpl/sysdeps/i386/*.S src/lib/lgpl/sysdeps/i386/*.c src/lib/lgpl/sysdeps/i386/i486/*.S)
-	gawk -f src/lib/mkstd.awk $^ >__tmp__
+_STD_WILDWILD = \
+	src/lib/*/*.c \
+	src/lib/*/386/*.s \
+	src/lib/msun/*/*.c \
+	src/lib/msun/*/*.S \
+	src/lib/bsd/*/*.c \
+	src/lib/bsd/*/glue/*.c \
+	src/lib/lgpl/*/*.c \
+	src/lib/lgpl/sysdeps/i386/*.S \
+	src/lib/lgpl/sysdeps/i386/*.c \
+	src/lib/lgpl/sysdeps/i386/i486/*.S \
+	src/lib/lgpl/sysdeps/i386/fpu/*.S \
+	src/lib/lgpl/sysdeps/i386/fpu/*.c \
+	src/lib/lgpl/sysdeps/generic/*.c \
+	src/lib/lgpl/sysdeps/ieee754/ldbl-96/*.c
+$.stmp-libc-std: $(wildcard $(_STD_WILDWILD))
+	cd src/lib && gawk -f ./mkstd.awk $(patsubst src/lib/%,%,$^) > ../../__tmp__
 	$(call UPDATE,__tmp__,$.libc-std.h)
 	$(call TOUCH,$@)
Index: trunk/src/emx/src/lib/libc06b5.def
===================================================================
--- trunk/src/emx/src/lib/libc06b5.def	(revision 2147)
+++ trunk/src/emx/src/lib/libc06b5.def	(revision 2150)
@@ -1666,25 +1666,25 @@
     "___fpclassifyf" @1669
     "___fpclassifyl" @1670
-    "_drem" @1671
-    "_dremf" @1672
+    "__std_drem" @1671
+    "__std_dremf" @1672
     "___exp__D" @1673
     "___fe_dfl_env" @1674
     "___fedisableexcept" @1675
     "___feenableexcept" @1676
-    "_finite" @1677
-    "_finitef" @1678
-    "_gamma" @1679
-    "_gammaf" @1680
-    "_gammaf_r" @1681
-    "_gamma_r" @1682
+    "__std_finite" @1677
+    "__std_finitef" @1678
+    "__std_gamma" @1679
+    "__std_gammaf" @1680
+    "__std_gammaf_r" @1681
+    "__std_gamma_r" @1682
     "___has_sse" @1683
     "___ieee754_rem_pio2" @1684
     "___ieee754_rem_pio2f" @1685
-    "_j0" @1686
-    "_j0f" @1687
-    "_j1" @1688
-    "_j1f" @1689
-    "_jn" @1690
-    "_jnf" @1691
+    "__std_j0" @1686
+    "__std_j0f" @1687
+    "__std_j1" @1688
+    "__std_j1f" @1689
+    "__std_jn" @1690
+    "__std_jnf" @1691
     "___kernel_cos" @1692
     "___kernel_cosf" @1693
@@ -1695,18 +1695,18 @@
     "___kernel_tan" @1698
     "___kernel_tanf" @1699
-    "_lgammaf_r" @1700
-    "_lgamma_r" @1701
+    "__std_lgammaf_r" @1700
+    "__std_lgamma_r" @1701
     "___log__D" @1702
-    "_scalb" @1703
-    "_significand" @1704
-    "_significandf" @1705
+    "__std_scalb" @1703
+    "__std_significand" @1704
+    "__std_significandf" @1705
     "__std_powl" @1706
     "___test_sse" @1707
-    "_y0" @1708
-    "_y0f" @1709
-    "_y1" @1710
-    "_y1f" @1711
-    "_yn" @1712
-    "_ynf" @1713
+    "__std_y0" @1708
+    "__std_y0f" @1709
+    "__std_y1" @1710
+    "__std_y1f" @1711
+    "__std_yn" @1712
+    "__std_ynf" @1713
     "_z_abs" @1714
     "___flt_rounds" @1715
Index: trunk/src/emx/src/lib/math/386/atan2l.s
===================================================================
--- trunk/src/emx/src/lib/math/386/atan2l.s	(revision 2147)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/ atan2.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(atan2l)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double atan2 (double y, double x)
-
-#define y        4(%esp)
-#if defined (LONG_DOUBLE)
-#define x       16(%esp)
-#else
-#define x       12(%esp)
-#endif
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     y                       /* y */
-        FLD     x                       /* x */
-        fpatan
-        EPILOGUE(FUNC)
Index: trunk/src/emx/src/lib/math/386/atanl.s
===================================================================
--- trunk/src/emx/src/lib/math/386/atanl.s	(revision 2147)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/ atan.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(atanl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double atan (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fldl    __const_ONE
-        fpatan
-        EPILOGUE(FUNC)
Index: trunk/src/emx/src/lib/math/386/fmodl.s
===================================================================
--- trunk/src/emx/src/lib/math/386/fmodl.s	(revision 2147)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/ fmod.s (emx+gcc) -- Copyright (c) 1992-1993 by Steffen Haecker
-/                     Modified 1993-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(fmodl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double fmod (double x, double y)
-
-/define ret_addr  0(%esp)
-#define x         4(%esp)
-#if defined (LONG_DOUBLE)
-#define y        16(%esp)
-#else
-#define y        12(%esp)
-#endif
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     y                       /* y */
-        ftst
-        fstsw   %ax
-        andw    $0x4100, %ax
-        xorb    $0x40, %ah
-        jz      2f                      /* y = 0 ? */
-        FLD     x                       /* x */
-1:      fprem
-        fstsw   %ax
-        andb    $0x04, %ah
-        jnz     1b                      /* C2 != 0 ? */
-        fstp    %st(1)
-2:      EPILOGUE(FUNC)
Index: trunk/src/emx/src/lib/math/386/log10l.s
===================================================================
--- trunk/src/emx/src/lib/math/386/log10l.s	(revision 2147)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/ log10.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(log10l)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double log10 (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fxam
-        fstsw  %ax
-        andb    $0x47, %ah
-        cmpb    $5, %ah
-        je      Lreturn                 /* x = +INF => return x */
-        fldl2t
-        fdivrl  __const_ONE
-        fxch    %st(1)
-        fyl2x
-        _xam
-        j_nan   Lerror
-        j_inf   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
Index: trunk/src/emx/src/lib/math/386/logl.s
===================================================================
--- trunk/src/emx/src/lib/math/386/logl.s	(revision 2147)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/ log.s (emx+gcc) -- Copyright (c) 1991-2000 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(logl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double log (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fxam
-        fstsw  %ax
-        andb    $0x47, %ah
-        cmpb    $5, %ah
-        je      Lreturn                 /* x = +INF => return x */
-        fldl2e
-        fdivrl  __const_ONE
-        fxch    %st(1)
-        fyl2x
-        _xam
-        j_nan   Lerror
-        j_inf   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
Index: trunk/src/emx/src/lib/math/386/powl.s
===================================================================
--- trunk/src/emx/src/lib/math/386/powl.s	(revision 2147)
+++ 	(revision )
@@ -1,319 +1,0 @@
-/ pow.s (emx+gcc) -- Copyright (c) 1991-1993 by Kolja Elsaesser
-/                    Modified 1992-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(powl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double pow (double x, double y)
-
-#define cw_user       -4(%ebp)
-#define cw_chop       -2(%ebp)
-/define saved_ebp      0(%ebp)
-/define ret_addr       4(%ebp)
-#define x              8(%ebp)
-#if defined (LONG_DOUBLE)
-#define y             20(%ebp)
-#else
-#define y             16(%ebp)
-#endif
-
-FUNC:
-        pushl   %ebp
-        movl    %esp, %ebp
-        PROFILE_FRAME
-        subl    $4, %esp
-        pushf                           /* Save flags */
-        fstcw   cw_user
-        movw    cw_user, %ax
-        orw     $0x0c00, %ax            /* Chop by truncating toward 0 */
-        movw    %ax, cw_chop
-        FLD     y
-        fxam
-        fstsw  %ax
-        movb    %ah, %al
-        andb    $0x47, %al
-        cmpb    $5, %al
-        je      Ly_pinf                 /* y = +INF */
-        cmpb    $7, %al
-        je      Ly_minf                 /* y = -INF */
-        andb    $0x45, %al
-        cmpb    $1, %al
-        je      Ly_nan                  /* y = NAN */
-        cmpb    $0x40, %al
-        je      Ly_zero                 /* y = 0 */
-        movb    %ah, %cl                /* cl := fxam(y) */
-
-/ -INF < y < 0 or 0 < y < INF.  Check x.
-
-        FLD     x
-        fxam
-        fstsw   %ax
-        movb    %ah, %al
-        andb    $0x47, %al
-        cmpb    $5, %al
-        je      Lx_pinf                 /* x = +INF */
-        cmpb    $7, %al
-        je      Lx_minf                 /* x = -INF */
-        andb    $0x45, %al
-        cmpb    $1, %al
-        je      Lx_nan                  /* x = NAN */
-        cmpb    $0x40, %al
-        je      Lx_zero                 /* x = 0 */
-        test    $2, %ah
-        jnz     Lx_neg                  /* x < 0 */
-
-/ x > 0, y non-zero and finite
-
-Lx_pos: call    Lpower
-        jmp     Ldone
-
-/ x > 0, y non-zero and finite, overflow of y*log(x)
-        ALIGN
-Lx_pos_ov:
-        FLD     x
-        fcomps  Lone
-        fnstsw  %ax
-        sahf
-        ja      Ldone
-        fchs
-        jmp     Ldone
-
-/ x = 0, y non-zero and finite
-
-        ALIGN
-Lx_zero:testb   $2, %cl
-        jnz     Lx_zero_y_neg
-
-/ x = 0, y > 0
-
-        fxch    %st(1)                  /* st(0) := y, st(1) := x */
-        call    Lis_odd_int
-        fstp    %st(0)                  /* Pop y */
-        cmpl    $1, %eax                /* Odd integer? */
-        je      Ldone                   /* Yes: return x (+0 or -0) */
-        fstp    %st(0)                  /* Pop x */
-        fldl    __const_ZERO            /* No: return +0 */
-        jmp     Ldone
-
-/ x = 0, y < 0
-Lx_zero_y_neg:
-        movb    %ah, %ch                /* ch := fxam(x) */
-        fxch    %st(1)                  /* st(0) := y, st(1) := x */
-        call    Lis_odd_int
-        fstp    %st(0)                  /* Pop y */
-        cmpl    $1, %eax                /* Odd integer? */
-        je      L1                      /* Yes: return 1/x (divide by zero) */
-        fstp    %st(0)                  /* Pop x */
-        fldl    __const_ZERO
-L1:     fdivrs  Lone
-        jmp     Ldone
-
-/ x = +INF, y non-zero and finite
-        ALIGN
-Lx_pinf:fstp    %st(1)                  /* pop x, st(0):=x */
-        testb   $2, %cl                 /* y > 0? */
-        jz      Ldone                   /* Yes: return x = +INF */
-        fstp    %st(0)                  /* Pop x */
-        fldl    __const_ZERO            /* Return +0 */
-        jmp     Ldone
-
-/ x = -INF, y non-zero and finite
-        ALIGN
-Lx_minf:testb   $2, %cl                 /* y < 0? */
-        jnz     Lx_minf_y_neg           /* Yes -> return +0 or -0 */
-        fxch    %st(1)                  /* st(0) := y, st(1) := x */
-        call    Lis_odd_int
-        fstp    %st(0)                  /* Pop y */
-        cmpl    $1, %eax                /* Is y an odd integer? */
-        je      Ldone                   /* Yes: return x = -INF */
-        fchs                            /* No: return -x = +INF */
-        jmp     Ldone
-
-/ x = +INF, y < 0 and finite
-        ALIGN
-Lx_minf_y_neg:
-        fstp    %st(0)                  /* Pop x */
-        call    Lis_odd_int
-        fstp    %st(0)                  /* Pop y */
-        fldl    __const_ZERO
-        cmpl    $1, %eax                /* Is y an odd integer? */
-        jne     Ldone                   /* No: return +0 */
-        fchs                            /* Yes: return -0 */
-        jmp     Ldone
-
-/ x = NAN, y non-zero and finite
-        ALIGN
-Lx_nan: fstp    %st(1)
-        jmp     Ldone
-
-/ y = 0
-        ALIGN
-Ly_zero:
-        fstp    %st(0)
-        flds    Lone
-        jmp     Ldone
-
-/ x < 0, y non-zero and finite
-        ALIGN
-Lx_neg: fxch    %st(1)                  /* st(0) := y, st(1) := x */
-        call    Lis_odd_int
-        cmp     $0, %eax                /* Is y an integer? */
-        je      Lx_neg_invalid          /* No -> return NAN */
-        fxch    %st(1)                  /* st(0) := x, st(1) := y */
-        fchs                            /* st(0) := -x */
-        movl    %eax, %ecx              /* Remember whether y is odd or not */
-        call    Lpower
-/ Change sign if y is odd
-        cmpl    $1, %ecx
-        jne     Ldone
-        fchs
-        jmp     Ldone
-
-/ x < 0, y not an integer
-        ALIGN
-Lx_neg_invalid:
-        fstp    %st(0)                  /* Pop y */
-        fstp    %st(0)                  /* Pop x */
-        jmp     Linvalid
-
-        ALIGN
-Ly_nan:                                 /* pow(x,NAN) = NAN */
-Ldone:  CONV(x)                         /* convert to double */
-        popf
-        leave
-        _xam
-        j_inf   Lerange
-        j_nan   Ledom
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerange:SET_ERRNO_CONST($ERANGE)
-        jmp     Lreturn
-
-        ALIGN
-Ledom:  SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
-
-/ pow(x,+INF)
-        ALIGN
-Ly_pinf:fstp    %st(0)
-        FLD     x
-        _xam
-        j_nan   Ldone
-        fabs
-        fcoms   Lone
-        fnstsw  %ax
-        fstp    %st(0)
-        sahf
-        jz      Linvalid
-        ja      Lret_pinf
-Lret_zero:
-        fldl    __const_ZERO
-        jmp     Ldone
-
-/ pow(x,-INF)
-        ALIGN
-Ly_minf:fstp    %st(0)                  /* Pop y */
-        FLD     x
-        _xam
-        j_nan   Ldone
-        fabs
-        fcoms   Lone
-        fnstsw  %ax
-        fstp    %st(0)                  /* Pop x */
-        sahf
-        jz      Linvalid
-        ja      Lret_zero
-Lret_pinf:
-        fldl    __HUGE_VAL
-        jmp     Ldone
-
-        ALIGN
-Linvalid:
-        fldl    __const_ZERO
-        fdivl   __const_ZERO
-        jmp     Ldone
-
-
-/ Check if x (in st(0)) is an odd integer
-/ Returns:
-/	0       x is not an integer
-/       1       x is an odd integer
-/       2       x is an even integer (or too big to be odd)
-/ x is not removed from the stack
-        ALIGN
-Lis_odd_int:
-        fld     %st                     /* st(0)=x, st(1)=x */
-        fldcw   cw_chop
-        frndint                         /* st(0)=int(x), st(1)=x */
-        fldcw   cw_user
-        fcom    %st(1)
-        fnstsw  %ax
-        sahf
-        jnz     Lnot_int                /* x not an integer */
-        fmuls   Lhalf                   /* st(0)=x/2, st(1)=x */
-        fldcw   cw_chop
-        frndint
-        fldcw   cw_user
-        fmuls   Ltwo                    /* st(0)=2*(x/2), st(1)=x */
-        fcomp   %st(1)
-        fnstsw  %ax
-        sahf
-        jnz     Lodd
-        movl    $2, %eax
-        ret
-
-        ALIGN
-Lodd:   movl    $1, %eax
-        ret
-
-        ALIGN
-Lnot_int:
-        fstp    %st(0)                  /* pop int(x) */
-        movl    $0, %eax
-        ret
-
-/ Compute st(0) ^ st(1)
-/ Note:  References x!
-
-        ALIGN
-Lpower:
-        fyl2x                           /* st(1) * log(st(0)) */
-        _xam
-        j_inf   Lpower_overflow
-        fld     %st
-        fldcw   cw_chop
-        frndint
-        fldcw   cw_user
-        fsubr   %st, %st(1)
-        fxch    %st(1)
-        f2xm1
-        fadds   Lone    /* TODO: to avoid overflow, scale 1.0, add later */
-        fscale
-        fstp    %st(1)                  /* Remove the scaling factor */
-        ret
-
-        ALIGN
-Lpower_overflow:
-        fabs
-        FLD     x
-        fabs
-        fcomps  Lone
-        fnstsw  %ax
-        sahf
-        ja      Lpower_ret
-        fdivrs  Lone
-Lpower_ret:
-        ret
-
-Lhalf:  .long 0x3f000000
-Lone:   .long 0x3f800000
-Ltwo:   .long 0x40000000
Index: trunk/src/emx/src/lib/math/386/rintl.s
===================================================================
--- trunk/src/emx/src/lib/math/386/rintl.s	(revision 2147)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/ rint.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(rintl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double _rint (double x)
-
-#define cw1       0(%esp)
-#define cw2       2(%esp)
-/define ret_addr  4(%esp)
-#define x         8(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        subl    $4, %esp
-        fstcw   cw1
-        movw    cw1, %ax
-        andw    $0xf3ff, %ax            /* round to nearest or even */
-        movw    %ax, cw2
-        fldcw   cw2
-        FLD     x                       /* x */
-        frndint
-        fldcw   cw1
-        addl    $4, %esp
-        EPILOGUE(FUNC)
Index: trunk/src/emx/src/lib/math/386/sqrtl.s
===================================================================
--- trunk/src/emx/src/lib/math/386/sqrtl.s	(revision 2147)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/ sqrt.s (emx+gcc) -- Copyright (c) 1991-1996 by Eberhard Mattes
-
-#define LONG_DOUBLE
-#include <emx/asm386.h>
-
-#define FUNC    _STD(sqrtl)
-
-        .globl  FUNC
-
-        .text
-
-        ALIGN
-
-/ double sqrt (double x)
-
-#define x       4(%esp)
-
-FUNC:
-        PROFILE_NOFRAME
-        FLD     x                       /* x */
-        fsqrt
-        _xam
-        j_nan   Lerror
-Lreturn:EPILOGUE(FUNC)
-
-        ALIGN
-Lerror: SET_ERRNO_CONST($EDOM)
-        jmp     Lreturn
Index: trunk/src/emx/src/lib/msun/i387/e_scalb.S
===================================================================
--- trunk/src/emx/src/lib/msun/i387/e_scalb.S	(revision 2147)
+++ trunk/src/emx/src/lib/msun/i387/e_scalb.S	(revision 2150)
@@ -38,5 +38,5 @@
 RCSID("$FreeBSD: src/lib/msun/i387/e_scalb.S,v 1.8 2005/02/04 14:08:32 das Exp $")
 
-ENTRY(scalb)
+STDENTRY(scalb)
 	fldl	12(%esp)
 	fldl	4(%esp)
Index: trunk/src/emx/src/lib/msun/i387/s_finite.S
===================================================================
--- trunk/src/emx/src/lib/msun/i387/s_finite.S	(revision 2147)
+++ trunk/src/emx/src/lib/msun/i387/s_finite.S	(revision 2150)
@@ -38,5 +38,5 @@
 RCSID("$FreeBSD: src/lib/msun/i387/s_finite.S,v 1.7 1999/08/28 00:06:12 peter Exp $")
 
-ENTRY(finite)
+STDENTRY(finite)
 	movl	8(%esp),%eax
 	andl	$0x7ff00000, %eax
Index: trunk/src/emx/src/lib/msun/i387/s_significand.S
===================================================================
--- trunk/src/emx/src/lib/msun/i387/s_significand.S	(revision 2147)
+++ trunk/src/emx/src/lib/msun/i387/s_significand.S	(revision 2150)
@@ -38,5 +38,5 @@
 RCSID("$FreeBSD: src/lib/msun/i387/s_significand.S,v 1.7 2000/06/06 12:12:36 bde Exp $")
 
-ENTRY(significand)
+STDENTRY(significand)
 	fldl	4(%esp)
 	fxtract
Index: trunk/src/emx/src/lib/msun/i387/s_significandf.S
===================================================================
--- trunk/src/emx/src/lib/msun/i387/s_significandf.S	(revision 2147)
+++ trunk/src/emx/src/lib/msun/i387/s_significandf.S	(revision 2150)
@@ -9,5 +9,5 @@
 /* RCSID("$NetBSD: s_significandf.S,v 1.3 1995/05/09 00:24:07 jtc Exp $") */
 
-ENTRY(significandf)
+STDENTRY(significandf)
 	flds	4(%esp)
 	fxtract
Index: trunk/src/emx/src/lib/msun/src/math_private.h
===================================================================
--- trunk/src/emx/src/lib/msun/src/math_private.h	(revision 2147)
+++ trunk/src/emx/src/lib/msun/src/math_private.h	(revision 2150)
@@ -214,4 +214,39 @@
 #define	__ieee754_scalbf scalbf
 
+/* bird added: */
+#define	__ieee754_log10l    log10l
+#define	__ieee754_logl      logl
+#define	__ieee754_expl      expl
+#define	__ieee754_sinhl     sinhl
+#define	__ieee754_coshl     coshl
+#define	__ieee754_sqrtl     sqrtl
+#define	__ieee754_atan2l    atan2l
+#define	__ieee754_hypotl    hypotl
+#define __ieee754_gammal    gammal
+long double __ieee754_gammal(long double);
+#define __ieee754_gammal_r  gammal_r
+long double __ieee754_gammal_r(long double,int *);
+#define __ieee754_lgammal_r lgammal_r
+long double __ieee754_lgammal_r(long double, int *);
+#define __ieee754_jnl jnl
+long double __ieee754_jnl(int,long double);
+#define __ieee754_j0l j0l
+long double __ieee754_j0l(long double);
+#define __ieee754_j1l j1l
+long double __ieee754_j1l(long double);
+#define __ieee754_y0l y0l
+long double __ieee754_y0l(long double);
+#define __ieee754_y1l y1l
+long double __ieee754_y1l(long double);
+#define __ieee754_jnl jnl
+long double __ieee754_jnl(int,long double);
+#define __ieee754_ynl ynl
+long double __ieee754_ynl(int,long double);
+#define __ieee754_acoshl acoshl
+long double __ieee754_acoshl(long double);
+#define __ieee754_remainderl remainderl
+long double __ieee754_remainderl(long double,long double);
+
+
 /* fdlibm kernel function */
 int	__ieee754_rem_pio2(double,double*);
Index: trunk/src/emx/src/lib/msun/src/s_nextafterl.c
===================================================================
--- trunk/src/emx/src/lib/msun/src/s_nextafterl.c	(revision 2147)
+++ trunk/src/emx/src/lib/msun/src/s_nextafterl.c	(revision 2150)
@@ -35,5 +35,5 @@
 
 long double
-nextafterl(long double x, long double y)
+_STD(nextafterl)(long double x, long double y)
 {
 	volatile long double t;
@@ -81,3 +81,3 @@
 }
 
-__strong_reference(nextafterl, nexttowardl);
+__strong_reference(_std_nextafterl, _std_nexttowardl);
Index: trunk/src/emx/src/lib/msun/src/s_scalbnf.c
===================================================================
--- trunk/src/emx/src/lib/msun/src/s_scalbnf.c	(revision 2147)
+++ trunk/src/emx/src/lib/msun/src/s_scalbnf.c	(revision 2150)
@@ -31,5 +31,5 @@
 
 float
-scalbnf (float x, int n)
+_STD(scalbnf) (float x, int n)
 {
 	int32_t k,ix;
@@ -57,3 +57,3 @@
 }
 
-__strong_reference(scalbnf, ldexpf);
+__strong_reference(_std_scalbnf, _std_ldexpf);
Index: trunk/src/emx/src/lib/msun/src/s_scalbnl.c
===================================================================
--- trunk/src/emx/src/lib/msun/src/s_scalbnl.c	(revision 2147)
+++ trunk/src/emx/src/lib/msun/src/s_scalbnl.c	(revision 2150)
@@ -44,5 +44,5 @@
 
 long double
-scalbnl (long double x, int n)
+_STD(scalbnl) (long double x, int n)
 {
 	union IEEEl2bits u;
@@ -70,3 +70,3 @@
 }
 
-__strong_reference(scalbnl, ldexpl);
+__strong_reference(_std_scalbnl, _std_ldexpl);
Index: trunk/src/emx/src/lib/msun/std-complex.c
===================================================================
--- trunk/src/emx/src/lib/msun/std-complex.c	(revision 2147)
+++ trunk/src/emx/src/lib/msun/std-complex.c	(revision 2150)
@@ -61,4 +61,65 @@
 long double	_STD(creall)(long double complex);
 
+/* bird: */
+long double          _STD(cabsl)(long double complex);
+double complex       _STD(cacos)(double complex);
+float complex        _STD(cacosf)(float complex);
+double complex       _STD(cacosh)(double complex);
+float complex        _STD(cacoshf)(float complex);
+long double complex  _STD(cacoshl)(long double complex);
+long double complex  _STD(cacosl)(long double complex);
+double               _STD(carg)(double complex);
+float                _STD(cargf)(float complex);
+long double          _STD(cargl)(long double complex);
+double complex       _STD(casin)(double complex);
+float complex        _STD(casinf)(float complex);
+double complex       _STD(casinh)(double complex);
+float complex        _STD(casinhf)(float complex);
+long double complex  _STD(casinhl)(long double complex);
+long double complex  _STD(casinl)(long double complex);
+double complex       _STD(catan)(double complex);
+float complex        _STD(catanf)(float complex);
+double complex       _STD(catanh)(double complex);
+float complex        _STD(catanhf)(float complex);
+long double complex  _STD(catanhl)(long double complex);
+long double complex  _STD(catanl)(long double complex);
+double complex       _STD(ccos)(double complex);
+float complex        _STD(ccosf)(float complex);
+double complex       _STD(ccosh)(double complex);
+float complex        _STD(ccoshf)(float complex);
+long double complex  _STD(ccoshl)(long double complex);
+long double complex  _STD(ccosl)(long double complex);
+double complex       _STD(cexp)(double complex);
+float complex        _STD(cexpf)(float complex);
+long double complex  _STD(cexpl)(long double complex);
+double complex       _STD(clog)(double complex);
+float complex        _STD(clogf)(float complex);
+long double complex  _STD(clogl)(long double complex);
+double complex       _STD(cpow)(double complex, double complex);
+float complex        _STD(cpowf)(float complex, float complex);
+long double complex  _STD(cpowl)(long double complex, long double complex);
+double complex       _STD(cproj)(double complex);
+float complex        _STD(cprojf)(float complex);
+long double complex  _STD(cprojl)(long double complex);
+double complex       _STD(csin)(double complex);
+float complex        _STD(csinf)(float complex);
+double complex       _STD(csinh)(double complex);
+float complex        _STD(csinhf)(float complex);
+long double complex  _STD(csinhl)(long double complex);
+long double complex  _STD(csinl)(long double complex);
+double complex       _STD(csqrt)(double complex);
+float complex        _STD(csqrtf)(float complex);
+long double complex  _STD(csqrtl)(long double complex);
+double complex       _STD(ctan)(double complex);
+float complex        _STD(ctanf)(float complex);
+double complex       _STD(ctanh)(double complex);
+float complex        _STD(ctanhf)(float complex);
+long double complex  _STD(ctanhl)(long double complex);
+long double complex  _STD(ctanl)(long double complex);
+
+double complex       _STD(clog10)(double complex);
+float complex        _STD(clog10f)(float complex);
+long double complex  _STD(clog10l)(long double complex);
+
 __END_DECLS
 
Index: trunk/src/emx/src/lib/msun/std-math.c
===================================================================
--- trunk/src/emx/src/lib/msun/std-math.c	(revision 2147)
+++ trunk/src/emx/src/lib/msun/std-math.c	(revision 2150)
@@ -252,14 +252,14 @@
 
 #if __BSD_VISIBLE || __XSI_VISIBLE
-double	j0(double);
-double	j1(double);
-double	jn(int, double);
-double	scalb(double, double);
-double	y0(double);
-double	y1(double);
-double	yn(int, double);
+double	_STD(j0)(double);
+double	_STD(j1)(double);
+double	_STD(jn)(int, double);
+double	_STD(scalb)(double, double);
+double	_STD(y0)(double);
+double	_STD(y1)(double);
+double	_STD(yn)(int, double);
 
 #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
-double	gamma(double);
+double	_STD(gamma)(double);
 #endif
 #endif /* __BSD_VISIBLE || __XSI_VISIBLE */
@@ -282,6 +282,6 @@
  */
 #if __BSD_VISIBLE
-double	drem(double, double);
-int	finite(double) __pure2;
+double _STD(drem)(double, double);
+int	_STD(finite)(double) __pure2;
 int	_STD(isnanf)(float) __pure2;
 
@@ -290,11 +290,11 @@
  * as the second argument; user must allocate space for signgam.
  */
-double	gamma_r(double, int *);
-double	lgamma_r(double, int *);
+double	_STD(gamma_r)(double, int *);
+double	_STD(lgamma_r)(double, int *);
 
 /*
  * IEEE Test Vector
  */
-double	significand(double);
+double	_STD(significand)(double);
 #endif /* __BSD_VISIBLE */
 
@@ -367,14 +367,14 @@
  */
 #if __BSD_VISIBLE
-float	dremf(float, float);
-int	finitef(float) __pure2;
-float	gammaf(float);
-float	j0f(float);
-float	j1f(float);
-float	jnf(int, float);
-float	scalbf(float, float);
-float	y0f(float);
-float	y1f(float);
-float	ynf(int, float);
+float	_STD(dremf)(float, float);
+int	_STD(finitef)(float) __pure2;
+float	_STD(gammaf)(float);
+float	_STD(j0f)(float);
+float	_STD(j1f)(float);
+float	_STD(jnf)(int, float);
+float	_STD(scalbf)(float, float);
+float	_STD(y0f)(float);
+float	_STD(y1f)(float);
+float	_STD(ynf)(int, float);
 
 /*
@@ -383,11 +383,11 @@
  * allocate space for signgam.
  */
-float	gammaf_r(float, int *);
-float	lgammaf_r(float, int *);
+float	_STD(gammaf_r)(float, int *);
+float	_STD(lgammaf_r)(float, int *);
 
 /*
  * float version of IEEE Test Vector
  */
-float	significandf(float);
+float	_STD(significandf)(float);
 #endif	/* __BSD_VISIBLE */
 
@@ -448,5 +448,5 @@
 #if 0
 long double	_STD(modfl)(long double, long double *); /* fundamentally !__pure2 */
-long double	_STD(nanl)(const char *) __pure2;
+long double	nanl(const char *) __pure2; /* gcc intrinsic */
 long double	_STD(nearbyintl)(long double);
 #endif
@@ -475,4 +475,29 @@
 
 #endif /* __ISO_C_VISIBLE >= 1999 */
+
+#ifdef __USE_GNU
+void _STD(sincos)(double, double *, double *);
+void _STD(sincosf)(float, float *, float *);
+void _STD(sincosl)(long double, long double *, long double *);
+float _STD(exp10f)(float);
+double _STD(exp10)(double);
+long double _STD(exp10l)(long double);
+float _STD(log2f)(float);
+double _STD(log2)(double);
+long double _STD(log2l)(long double);
+float _STD(tgammaf)(float);
+long double _STD(significandl)(long double);
+long double _STD(j0l)(long double);
+long double _STD(j1l)(long double);
+long double _STD(jnl)(int, long double);
+long double _STD(scalbl)(long double, long double);
+long double _STD(y0l)(long double);
+long double _STD(y1l)(long double);
+long double _STD(ynl)(int, long double);
+long double _STD(gammal)(long double);
+long double _STD(gammal_r)(long double,int *);
+long double _STD(lgammal_r)(long double,int *);
+
+#endif
 __END_DECLS
 
