Make it possible to alias stpcpy and strdup.
authorBruno Haible <bruno@clisp.org>
Wed, 11 Oct 2006 12:48:10 +0000 (12:48 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 11 Oct 2006 12:48:10 +0000 (12:48 +0000)
ChangeLog
lib/stpcpy.c
lib/strdup.c

index 4a24646..3859710 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-10-10  Bruno Haible  <bruno@clisp.org>
 
+       Make it possible to #define stpcpy, strdup to aliases.
+       * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
+       * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
+
+2006-10-10  Bruno Haible  <bruno@clisp.org>
+
        Make it possible to #define gcd to an alias.
        * lib/gcd.c: Include config.h.
 
index 870fd6d..4089d39 100644 (file)
@@ -23,7 +23,9 @@
 #include <string.h>
 
 #undef __stpcpy
-#undef stpcpy
+#ifdef _LIBC
+# undef stpcpy
+#endif
 
 #ifndef weak_alias
 # define __stpcpy stpcpy
index 7cff51b..17d40d6 100644 (file)
@@ -27,7 +27,9 @@
 #include <string.h>
 
 #undef __strdup
-#undef strdup
+#ifdef _LIBC
+# undef strdup
+#endif
 
 #ifndef weak_alias
 # define __strdup strdup