[!weak_alias]: Define __memrchr to memrchr.
Guard weak_alias use with `#ifdef weak_alias'.
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
-#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. */
# define __ptr_t void *
#else /* Not C++ or ANSI C. */
# define __ptr_t char *
#endif /* C++ or ANSI C. */
# include <string.h>
# include <memcopy.h>
#else
# define reg_char char
#endif
# 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
# include <limits.h>
#endif
+#ifndef weak_alias
+# define __memrchr memrchr
+#endif
/* Search no more than N bytes of S for C. */
__ptr_t
/* Search no more than N bytes of S for C. */
__ptr_t
weak_alias (__memrchr, memrchr)
weak_alias (__memrchr, memrchr)