Index: /trunk/src/emx/include/emx/asm386.h
===================================================================
--- /trunk/src/emx/include/emx/asm386.h	(revision 520)
+++ /trunk/src/emx/include/emx/asm386.h	(revision 521)
@@ -12,11 +12,11 @@
 #define j_inf cmpb $0x05, %ah; je
 
-/* MATHSUFFIX1 is for sin() vs. _sinf() vs. _sinl() */
+/* MATHSUFFIX1 is for sin() vs. sinf() vs. sinl() */
 /* MATHSUFFIX2 is for _sin() vs. _sinf() vs. _sinl() */
-/* MATHSUFFIX3 is for __sin() vs. __sinf() vs. __sinl () */
+/* MATHSUFFIX3 is for __sin() vs. __sinf() vs. __sinl() + defined sin... */
 
 #if defined (LONG_DOUBLE)
 #define FLD fldt
-#define MATHSUFFIX1(X)  __##X##l
+#define MATHSUFFIX1(X)  _STD(X##l)
 #define MATHSUFFIX2(X)  __##X##l
 #define MATHSUFFIX3(X)  ___##X##l
@@ -24,5 +24,5 @@
 #elif defined (FLOAT)
 #define FLD flds
-#define MATHSUFFIX1(X)  __##X##f
+#define MATHSUFFIX1(X)  _STD(X##f)
 #define MATHSUFFIX2(X)  __##X##f
 #define MATHSUFFIX3(X)  ___##X##f
Index: /trunk/src/emx/src/lib/libc.def
===================================================================
--- /trunk/src/emx/src/lib/libc.def	(revision 520)
+++ /trunk/src/emx/src/lib/libc.def	(revision 521)
@@ -65,4 +65,11 @@
     "__atexit_v" @45
     "__thread_tab" @46
+    "___digits" @47
+    "___locale" @48
+    "___locale_C" @49
+    "___locale_collate" @50
+    "___locale_ctype" @51
+    "___locale_lconv" @52
+    "___locale_time" @53
 
 ; code
@@ -438,5 +445,5 @@
     "__bi_sub_mul_bw" @469
     "__bi_wdiv_rem_pow2" @470
-    "__cbrtl" @471
+    "__std_cbrtl" @471
     "__cfgetispeed" @472
     "__cfgetospeed" @473
@@ -716,90 +723,84 @@
     "___utimes" @747
     "___convert_codepage" @748
-    "___digits" @749
-    "___do_Unicode" @750
-    "___from_ucs" @751
-    "_isascii" @752
-    "___locale" @753
-    "___locale_C" @754
-    "___locale_collate" @755
-    "___locale_ctype" @756
-    "___locale_lconv" @757
-    "___locale_time" @758
-    "___gnu_basename" @759
-    "__std_basename" @760
-    "__std_dirname" @761
-    "__std_lltoa" @762
-    "__std_localeconv" @763
-    "__std_ltoa" @764
-    "__std_setlocale" @765
-    "__std_ulltoa" @766
-    "__std_ultoa" @767
-    "_toascii" @768
-    "___to_ucs" @769
-    "__std_acosl" @770
-    "__std_asinl" @771
-    "__std_atan2l" @772
-    "__std_atanl" @773
-    "__std_ceill" @774
-    "__std_copysign" @775
-    "__std_copysignf" @776
-    "__std_copysignl" @777
-    "__std_coshl" @778
-    "__std_cosl" @779
-    "__std_expl" @780
-    "__std_fabsl" @781
-    "__std_floorl" @782
-    "__std_fmodl" @783
-    "__std_frexpl" @784
-    "__std_fxam" @785
-    "__std_fxaml" @786
-    "__std_hypot" @787
-    "__std_hypotl" @788
-    "__std_ldexpl" @789
-    "__std_log10l" @790
-    "__std_logl" @791
-    "__std_modfl" @792
-    "__std_nextafter" @793
-    "__std_nextafterf" @794
-    "__std_nextafterl" @795
-    "__std_powl" @796
-    "__std_rint" @797
-    "__std_rintl" @798
-    "__std_sinhl" @799
-    "__std_sinl" @800
-    "__std_sqrtl" @801
-    "__std_tanhl" @802
-    "__std_tanl" @803
-    "__std_trunc" @804
-    "__std_truncl" @805
-    "__ead_add" @806
-    "__ead_clear" @807
-    "__ead_copy" @808
-    "__ead_count" @809
-    "__ead_create" @810
-    "__ead_delete" @811
-    "__ead_destroy" @812
-    "__ead_enum" @813
-    "__ead_fea2list_size" @814
-    "__ead_fea2list_to_fealist" @815
-    "__ead_fealist_to_fea2list" @816
-    "__ead_find" @817
-    "__ead_get_fea2list" @818
-    "__ead_get_flags" @819
-    "__ead_get_name" @820
-    "__ead_get_value" @821
-    "__ead_make_index" @822
-    "__ead_name_len" @823
-    "__ead_read" @824
-    "__ead_replace" @825
-    "__ead_size_buffer" @826
-    "__ead_sort" @827
-    "__ead_use_fea2list" @828
-    "__ead_value_size" @829
-    "__ead_write" @830
-    "__ea_free" @831
-    "__ea_get" @832
-    "__ea_put" @833
-    "__ea_remove" @834
-    "__ea_set_errno" @835
-    "__ea_write" @836
+    "___do_Unicode" @749
+    "___from_ucs" @750
+    "_isascii" @751
+    "___gnu_basename" @752
+    "__std_basename" @753
+    "__std_dirname" @754
+    "__std_lltoa" @755
+    "__std_localeconv" @756
+    "__std_ltoa" @757
+    "__std_setlocale" @758
+    "__std_ulltoa" @759
+    "__std_ultoa" @760
+    "_toascii" @761
+    "___to_ucs" @762
+    "__std_acosl" @763
+    "__std_asinl" @764
+    "__std_atan2l" @765
+    "__std_atanl" @766
+    "__std_ceill" @767
+    "__std_copysign" @768
+    "__std_copysignf" @769
+    "__std_copysignl" @770
+    "__std_coshl" @771
+    "__std_cosl" @772
+    "__std_expl" @773
+    "__std_fabsl" @774
+    "__std_floorl" @775
+    "__std_fmodl" @776
+    "__std_frexpl" @777
+    "__fxam" @778
+    "__fxaml" @779
+    "__std_hypot" @780
+    "__std_hypotl" @781
+    "__std_ldexpl" @782
+    "__std_log10l" @783
+    "__std_logl" @784
+    "__std_modfl" @785
+    "__std_nextafter" @786
+    "__std_nextafterf" @787
+    "__std_nextafterl" @788
+    "__std_powl" @789
+    "__std_rint" @790
+    "__std_rintl" @791
+    "__std_sinhl" @792
+    "__std_sinl" @793
+    "__std_sqrtl" @794
+    "__std_tanhl" @795
+    "__std_tanl" @796
+    "__std_trunc" @797
+    "__std_truncl" @798
+    "__ead_add" @799
+    "__ead_clear" @800
+    "__ead_copy" @801
+    "__ead_count" @802
+    "__ead_create" @803
+    "__ead_delete" @804
+    "__ead_destroy" @805
+    "__ead_enum" @806
+    "__ead_fea2list_size" @807
+    "__ead_fea2list_to_fealist" @808
+    "__ead_fealist_to_fea2list" @809
+    "__ead_find" @810
+    "__ead_get_fea2list" @811
+    "__ead_get_flags" @812
+    "__ead_get_name" @813
+    "__ead_get_value" @814
+    "__ead_make_index" @815
+    "__ead_name_len" @816
+    "__ead_read" @817
+    "__ead_replace" @818
+    "__ead_size_buffer" @819
+    "__ead_sort" @820
+    "__ead_use_fea2list" @821
+    "__ead_value_size" @822
+    "__ead_write" @823
+    "__ea_free" @824
+    "__ea_get" @825
+    "__ea_put" @826
+    "__ea_remove" @827
+    "__ea_set_errno" @828
+    "__ea_write" @829
+    
Index: /trunk/src/emx/src/lib/math/386/copysig.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/copysig.s	(revision 520)
+++ /trunk/src/emx/src/lib/math/386/copysig.s	(revision 521)
@@ -3,5 +3,5 @@
 #include <emx/asm386.h>
 
-#define FUNC    MATHSUFFIX2(copysign)
+#define FUNC    MATHSUFFIX1(copysign)
 
         .globl  FUNC
Index: /trunk/src/emx/src/lib/math/386/hypot.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/hypot.s	(revision 520)
+++ /trunk/src/emx/src/lib/math/386/hypot.s	(revision 521)
@@ -7,5 +7,5 @@
 #include <emx/asm386.h>
 
-#define FUNC    MATHSUFFIX2(hypot)
+#define FUNC    MATHSUFFIX1(hypot)
 
         .globl  FUNC
Index: /trunk/src/emx/src/lib/math/386/nextaft.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/nextaft.s	(revision 520)
+++ /trunk/src/emx/src/lib/math/386/nextaft.s	(revision 521)
@@ -3,5 +3,5 @@
 #include <emx/asm386.h>
 
-#define FUNC    MATHSUFFIX2(nextafter)
+#define FUNC    MATHSUFFIX1(nextafter)
 
         .globl  FUNC
Index: /trunk/src/emx/src/lib/math/386/rint.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/rint.s	(revision 520)
+++ /trunk/src/emx/src/lib/math/386/rint.s	(revision 521)
@@ -3,5 +3,5 @@
 #include <emx/asm386.h>
 
-#define FUNC    MATHSUFFIX2(rint)
+#define FUNC    MATHSUFFIX1(rint)
 
         .globl  FUNC
Index: /trunk/src/emx/src/lib/math/386/trunc.s
===================================================================
--- /trunk/src/emx/src/lib/math/386/trunc.s	(revision 520)
+++ /trunk/src/emx/src/lib/math/386/trunc.s	(revision 521)
@@ -3,5 +3,5 @@
 #include <emx/asm386.h>
 
-#define FUNC    MATHSUFFIX2(trunc)
+#define FUNC    MATHSUFFIX1(trunc)
 
         .globl  FUNC
Index: /trunk/src/emx/src/lib/math/cbrtl.c
===================================================================
--- /trunk/src/emx/src/lib/math/cbrtl.c	(revision 520)
+++ /trunk/src/emx/src/lib/math/cbrtl.c	(revision 521)
@@ -1,7 +1,8 @@
 /* cbrtl.c (emx+gcc) -- Copyright (c) 1992-1995 by Eberhard Mattes */
 
+#include "libc-alias.h"
 #include <math.h>
 
-long double _cbrtl (long double x)
+long double _STD(cbrtl) (long double x)
 {
   if (x >= 0)
Index: /trunk/src/emx/src/lib/mkstd.awk
===================================================================
--- /trunk/src/emx/src/lib/mkstd.awk	(revision 520)
+++ /trunk/src/emx/src/lib/mkstd.awk	(revision 521)
@@ -39,5 +39,8 @@
   while (match($0, "MATHSUFFIX1\\( *[_0-9A-Za-z ]+ *\\)"))
   {
-    std_fun[gensub("MATHSUFFIX1\\( *([_0-9A-Za-z]+) *\\).*", "\\1", "", substr($0,RSTART,RLENGTH))]=1;
+    fun = gensub("MATHSUFFIX1\\( *([_0-9A-Za-z]+) *\\).*", "\\1", "", substr($0,RSTART,RLENGTH))
+    std_fun[fun]=1;
+    std_fun[fun "f"]=1;
+    std_fun[fun "l"]=1;
     $0 = substr($0, 1, RSTART-1) substr($0, RSTART+RLENGTH);
   }
