Mercurial > hg > octave-nkf > gnulib-hg
changeset 9972:fe7374adaf04
Define memchr, not __memchr.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 26 Apr 2008 12:31:13 +0200 |
parents | e70f61b955b9 |
children | 24a3fc9d1291 |
files | ChangeLog lib/memchr.c |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- a/lib/memchr.c +++ b/lib/memchr.c @@ -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 @@ # 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 *