diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-10-23 23:19:40 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-10-23 23:19:40 +0000 |
commit | 298ea0ffa5ee721cc1d0714f38fb12f86593cb3c (patch) | |
tree | ecec18f3ec153f72f6bf0bc2f509c1e4beb461cf /sysdeps/generic | |
parent | 9807e5408bf1d7f879216f0000c1f220beb89d93 (diff) | |
download | glibc-298ea0ffa5ee721cc1d0714f38fb12f86593cb3c.zip glibc-298ea0ffa5ee721cc1d0714f38fb12f86593cb3c.tar.gz glibc-298ea0ffa5ee721cc1d0714f38fb12f86593cb3c.tar.bz2 |
Update.
2000-10-23 Jim Meyering <meyering@ascend.com>
Allow this code to be used outside of glibc.
* sysdeps/generic/memrchr.c: Undef __memrchr, too.
[!weak_alias]: Define __memrchr to memrchr.
Guard weak_alias use with `#ifdef weak_alias'.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/memrchr.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sysdeps/generic/memrchr.c b/sysdeps/generic/memrchr.c index 0dc1007..6fa918d 100644 --- a/sysdeps/generic/memrchr.c +++ b/sysdeps/generic/memrchr.c @@ -24,24 +24,24 @@ #include <stdlib.h> #ifdef HAVE_CONFIG_H -#include <config.h> +# include <config.h> #endif #undef __ptr_t -#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) +#if defined __cplusplus || (defined __STDC__ && __STDC__) # define __ptr_t void * #else /* Not C++ or ANSI C. */ # define __ptr_t char * #endif /* C++ or ANSI C. */ -#if defined (_LIBC) +#if defined _LIBC # include <string.h> # include <memcopy.h> #else # define reg_char char #endif -#if defined (HAVE_LIMITS_H) || defined (_LIBC) +#if defined HAVE_LIMITS_H || defined _LIBC # include <limits.h> #endif @@ -53,8 +53,12 @@ #include <sys/types.h> +#undef __memrchr #undef memrchr +#ifndef weak_alias +# define __memrchr memrchr +#endif /* Search no more than N bytes of S for C. */ __ptr_t @@ -200,4 +204,6 @@ __memrchr (s, c_in, n) return 0; } +#ifdef weak_alias weak_alias (__memrchr, memrchr) +#endif |