summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-01-13 21:31:45 +0000
committerUlrich Drepper <drepper@redhat.com>2007-01-13 21:31:45 +0000
commit23691ab23b6e631ae0c5cf58455cca25a0058e22 (patch)
tree1f9e01efec775d4c7deb203116c5a29a3b8999e5
parent4a4a65f24cf3611e7dfb1c34317df929650f0bf9 (diff)
downloadglibc-23691ab23b6e631ae0c5cf58455cca25a0058e22.tar.gz
glibc-23691ab23b6e631ae0c5cf58455cca25a0058e22.tar.xz
glibc-23691ab23b6e631ae0c5cf58455cca25a0058e22.zip
* include/string.h: Only redefine strndupa if this is really for
	libc code.
-rw-r--r--ChangeLog5
-rw-r--r--include/string.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d35ac4dae..9551c4e704 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-13  Ulrich Drepper  <drepper@redhat.com>
+
+	* include/string.h: Only redefine strndupa if this is really for
+	libc code.
+
 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
 
 	* nscd/nscd_gethst_r.c: Minor cleanups.
diff --git a/include/string.h b/include/string.h
index c196007dcb..f73bbf9f43 100644
--- a/include/string.h
+++ b/include/string.h
@@ -54,8 +54,9 @@ extern __typeof (strcasecmp_l) __strcasecmp_l;
 extern __typeof (strncasecmp_l) __strncasecmp_l;
 
 /* Alternative version which doesn't pollute glibc's namespace.  */
-#undef strndupa
-#define strndupa(s, n)							      \
+#ifndef NOT_IN_libc
+# undef strndupa
+# define strndupa(s, n)							      \
   (__extension__							      \
     ({									      \
       __const char *__old = (s);					      \
@@ -64,6 +65,7 @@ extern __typeof (strncasecmp_l) __strncasecmp_l;
       __new[__len] = '\0';						      \
       (char *) memcpy (__new, __old, __len);				      \
     }))
+#endif
 
 libc_hidden_proto (__mempcpy)
 libc_hidden_proto (__stpcpy)