From: Hallvard Furuseth Date: Mon, 14 Nov 2005 16:02:04 +0000 (+0000) Subject: Declare memrchr() also when HAVE_MEMRCHR, since glibc by default does not. X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4b9d08fd9b684899218e88f078c746b891ab7a10;p=openldap Declare memrchr() also when HAVE_MEMRCHR, since glibc by default does not. Might need a worse #ifdef mess if any non-glibc memrchr() turns up. --- diff --git a/include/ac/string.h b/include/ac/string.h index 9d07bf4b43..7a5931e37e 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -94,12 +94,12 @@ int (strncasecmp)(); #define memcmp lutil_memcmp #endif +/* GNU extension (glibc >= 2.1.91), only declared when defined(_GNU_SOURCE) */ #ifndef HAVE_MEMRCHR - /* Actually, I think this is a GNU extension only */ - void * lutil_memrchr(const void *b, int c, size_t len); #undef memrchr #define memrchr lutil_memrchr #endif /* ! HAVE_MEMRCHR */ +void * memrchr(const void *b, int c, size_t len); #define STRLENOF(s) (sizeof(s)-1)