bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

memchr module


From: Bruno Haible
Subject: memchr module
Date: Sat, 26 Apr 2008 12:31:02 +0200
User-agent: KMail/1.5.4

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  <address@hidden>

        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 (address@hidden),
     with help from Dan Sahlin (address@hidden) 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 (address@hidden),
     with help from Dan Sahlin (address@hidden) 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 *





reply via email to

[Prev in Thread] Current Thread [Next in Thread]