From: Kurt Zeilenga Date: Fri, 20 Nov 1998 07:04:20 +0000 (+0000) Subject: Update string.h to unconditional declare forwards for X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~1076 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8dcc4b6c8f374e5323927d1301745a4b86bdeffb;p=openldap Update string.h to unconditional declare forwards for strdup(), strcasecmp(), strncasecmp(). Should test to see if these are truely needed. Hopefully their addition will not break other platforms. --- diff --git a/include/ac/string.h b/include/ac/string.h index 19efea1b78..2b407e7eb3 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -17,11 +17,12 @@ # include # endif + /* we should actually create */ # ifdef HAVE_MALLOC_H # include # endif -# ifndef HAVE_STRCHR +# ifndef HAVE_STRRCHR # define strchr index # define strrchr rindex # endif @@ -32,14 +33,20 @@ # endif #endif -/* - * provide prototypes for missing functions that we replace. - * replacements can be found in -llutil - */ #ifndef HAVE_STRDUP - char *strdup( const char *s ); + /* strdup() is missing, declare our own version */ + extern char *strdup( const char *s ); +#else + /* some systems fail to declare strdup altogether */ + extern char *strdup(); #endif +/* + * some systems fail to declare strcasecmp() and strncasecmp() + * we need them defined so we obtain pointers to them + */ +extern int strcasecmp(), strncasecmp(); + #ifndef SAFEMEMCPY # if defined( HAVE_MEMMOVE ) # define SAFEMEMCPY( d, s, n ) memmove((d), (s), (n)) @@ -51,4 +58,5 @@ # endif #endif + #endif /* _AC_STRING_H */