Skip to content
Snippets Groups Projects
Commit 8dcc4b6c authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

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.
parent 120b7fed
No related branches found
No related tags found
No related merge requests found
......@@ -17,11 +17,12 @@
# include <memory.h>
# endif
/* we should actually create <ac/stdlib.h> */
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# 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 */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment