changeset 39888:281300b4ad17

memcmp: Make it possible to namespace the defined symbol. * lib/memcmp.c (memcmp): Don't undefine outside of glibc.
author Bruno Haible <bruno@clisp.org>
date Fri, 05 Oct 2018 21:50:47 +0200
parents e6ce7ef2af3e
children 38e070a924c2
files ChangeLog lib/memcmp.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 05 21:49:39 2018 +0200
+++ b/ChangeLog	Fri Oct 05 21:50:47 2018 +0200
@@ -1,3 +1,8 @@
+2018-10-05  Bruno Haible  <bruno@clisp.org>
+
+	memcmp: Make it possible to namespace the defined symbol.
+	* lib/memcmp.c (memcmp): Don't undefine outside of glibc.
+
 2018-10-05  Bruno Haible  <bruno@clisp.org>
 
 	explicit_bzero: Make it possible to namespace the defined symbol.
--- a/lib/memcmp.c	Fri Oct 05 21:49:39 2018 +0200
+++ b/lib/memcmp.c	Fri Oct 05 21:50:47 2018 +0200
@@ -27,9 +27,9 @@
 
 #include <stdint.h>
 
-#undef memcmp
+#ifdef _LIBC
 
-#ifdef _LIBC
+# undef memcmp
 
 # include <memcopy.h>
 # include <endian.h>