Configure sets HAVE_STRDUP, check for that instead of NEED_STRDUP.

This commit is contained in:
Joachim Nilsson 2010-07-18 03:36:05 +02:00
parent 2d2ec7db98
commit f874ad60ab
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@
#define MAX_TOTAL_MATCHES (256 << sizeof(char *)) #define MAX_TOTAL_MATCHES (256 << sizeof(char *))
#ifdef NEED_STRDUP #ifndef HAVE_STRDUP
/* Return an allocated copy of a string. */ /* Return an allocated copy of a string. */
char *strdup(const char *p) char *strdup(const char *p)
{ {

View File

@ -93,7 +93,7 @@ extern int strlen(const char *s);
extern int strncmp(const char *s1, const char *s2, size_t n); extern int strncmp(const char *s1, const char *s2, size_t n);
#endif/* !HAVE_STDLIB */ #endif/* !HAVE_STDLIB */
#ifdef NEED_STRDUP #ifndef HAVE_STRDUP
extern char *strdup(const char *s); extern char *strdup(const char *s);
#endif #endif