Define memchr, not __memchr.
authorBruno Haible <bruno@clisp.org>
Sat, 26 Apr 2008 10:31:13 +0000 (12:31 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 26 Apr 2008 10:31:13 +0000 (12:31 +0200)
ChangeLog
lib/memchr.c

index ee543a2920d962c07f821ef07c9990bd33310fe7..85c078e81e58df4d7a19a2cf333d3122d4a27899 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-26  Bruno Haible  <bruno@clisp.org>
+
+       Fix module 'memchr', broken since 2000-10-28.
+       * lib/memchr.c: Outside glibc, define memchr, not __memchr.
+
 2008-04-26  Bruno Haible  <bruno@clisp.org>
 
        * lib/memchr2.c (memchr2): Rename local variables. Add explanatory
index b47eaef55f133cfe8763ac410033b447ccd28f23..af0e77ff41556d5ba0303891b3581f75ca871a60 100644 (file)
@@ -1,5 +1,5 @@
-/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006 Free
-   Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006, 2008
+   Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se) and
@@ -45,8 +45,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 # define BP_SYM(sym) sym
 #endif
 
-#undef memchr
 #undef __memchr
+#ifdef _LIBC
+# undef memchr
+#endif
+
+#ifndef weak_alias
+# define __memchr memchr
+#endif
 
 /* Search no more than N bytes of S for C.  */
 void *