The memchr module is broken since 2000-10-28: Instead of defining a function
memchr(), it defines a function __memchr(). It should have led to link errors
any time it was really used. I am fixing it like this. But we could just as
well remove this module, since no such link errors were reported in 7 years.
2008-04-26 Bruno Haible <[EMAIL PROTECTED]>
Fix module 'memchr', broken since 2000-10-28.
* lib/memchr.c: Outside glibc, define memchr, not __memchr.
*** lib/memchr.c.orig 2008-04-26 12:26:21.000000000 +0200
--- lib/memchr.c 2008-04-26 12:26:06.000000000 +0200
***************
*** 1,5 ****
! /* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006 Free
! Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund ([EMAIL PROTECTED]),
with help from Dan Sahlin ([EMAIL PROTECTED]) and
--- 1,5 ----
! /* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006, 2008
! Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund ([EMAIL PROTECTED]),
with help from Dan Sahlin ([EMAIL PROTECTED]) and
***************
*** 45,52 ****
# define BP_SYM(sym) sym
#endif
- #undef memchr
#undef __memchr
/* Search no more than N bytes of S for C. */
void *
--- 45,58 ----
# define BP_SYM(sym) sym
#endif
#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 *