From: Kurt Zeilenga Date: Sat, 20 Feb 1999 18:31:56 +0000 (+0000) Subject: #undef symbols before #defining them. This provides a little protection X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~555 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=84bafea62eb47f5015b30af64aea1f7295ea3674;p=openldap #undef symbols before #defining them. This provides a little protection when symbol being replaced was defined as a macro. --- diff --git a/include/ac/string.h b/include/ac/string.h index 2882db1240..a3d0fe4c88 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -32,24 +32,30 @@ # endif # ifndef HAVE_STRRCHR +# undef strchr # define strchr index +# undef strrchr # define strrchr rindex # endif # ifndef HAVE_MEMCPY +# undef memcpy # define memcpy(d, s, n) ((void) bcopy ((s), (d), (n))) +# undef memmove # define memmove(d, s, n) ((void) bcopy ((s), (d), (n))) # endif #endif extern char *ldap_pvt_strtok( char *str, const char *delim, char **pos ); #ifndef HAVE_STRTOK_R +# undef strtok_r # define strtok_r(s, d, p) ldap_pvt_strtok((s),(d),(p)) #endif extern char *ldap_pvt_strdup( const char * s ); #ifndef HAVE_STRDUP /* strdup() is missing, declare our own version */ +# undef strdup # define strdup(s) ldap_pvt_strdup(s) #else /* some systems fail to declare strdup */