changeset 7473:44fe37f21d92

Make it possible to alias stpcpy and strdup.
author Bruno Haible <bruno@clisp.org>
date Wed, 11 Oct 2006 12:48:10 +0000
parents 7a37f7479e2a
children 8fe931e85f4f
files ChangeLog lib/stpcpy.c lib/strdup.c
diffstat 3 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
--- a/lib/stpcpy.c
+++ b/lib/stpcpy.c
@@ -23,7 +23,9 @@
 #include <string.h>
 
 #undef __stpcpy
-#undef stpcpy
+#ifdef _LIBC
+# undef stpcpy
+#endif
 
 #ifndef weak_alias
 # define __stpcpy stpcpy
--- a/lib/strdup.c
+++ b/lib/strdup.c
@@ -27,7 +27,9 @@
 #include <string.h>
 
 #undef __strdup
-#undef strdup
+#ifdef _LIBC
+# undef strdup
+#endif
 
 #ifndef weak_alias
 # define __strdup strdup