changeset 39891:ecf9a91cdbcb

strpbrk: Make it possible to namespace the defined symbol. * lib/strpbrk.c (strpbrk): Don't undefine outside of glibc.
author Bruno Haible <bruno@clisp.org>
date Fri, 05 Oct 2018 21:54:56 +0200
parents 3b389d4449c2
children 6475c170e833
files ChangeLog lib/strpbrk.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 05 21:54:14 2018 +0200
+++ b/ChangeLog	Fri Oct 05 21:54:56 2018 +0200
@@ -1,3 +1,8 @@
+2018-10-05  Bruno Haible  <bruno@clisp.org>
+
+	strpbrk: Make it possible to namespace the defined symbol.
+	* lib/strpbrk.c (strpbrk): Don't undefine outside of glibc.
+
 2018-10-05  Bruno Haible  <bruno@clisp.org>
 
 	strcspn: Make it possible to namespace the defined symbol.
--- a/lib/strpbrk.c	Fri Oct 05 21:54:14 2018 +0200
+++ b/lib/strpbrk.c	Fri Oct 05 21:54:56 2018 +0200
@@ -22,7 +22,9 @@
 #include <stddef.h>
 #include <string.h>
 
-#undef strpbrk
+#if _LIBC
+# undef strpbrk
+#endif
 
 /* Find the first occurrence in S of any character in ACCEPT.  */
 char *