changeset 39890:3b389d4449c2

strcspn: Make it possible to namespace the defined symbol. * lib/strcspn.c (strcspn): Don't undefine outside of glibc.
author Bruno Haible <bruno@clisp.org>
date Fri, 05 Oct 2018 21:54:14 +0200
parents 38e070a924c2
children ecf9a91cdbcb
files ChangeLog lib/strcspn.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 05 21:53:24 2018 +0200
+++ b/ChangeLog	Fri Oct 05 21:54:14 2018 +0200
@@ -1,3 +1,8 @@
+2018-10-05  Bruno Haible  <bruno@clisp.org>
+
+	strcspn: Make it possible to namespace the defined symbol.
+	* lib/strcspn.c (strcspn): Don't undefine outside of glibc.
+
 2018-10-05  Bruno Haible  <bruno@clisp.org>
 
 	raise: Make it possible to namespace the defined symbol.
--- a/lib/strcspn.c	Fri Oct 05 21:53:24 2018 +0200
+++ b/lib/strcspn.c	Fri Oct 05 21:54:14 2018 +0200
@@ -22,7 +22,9 @@
 #include <stddef.h>
 #include <string.h>
 
-#undef strcspn
+#if _LIBC
+# undef strcspn
+#endif
 
 /* Return the length of the maximum initial segment of S
    which contains no characters from REJECT.  */