Move strdup() fallback implementation to platform code.

This commit is contained in:
Joachim Nilsson
2010-07-24 02:02:56 +02:00
parent ceb1995733
commit a848011073
2 changed files with 15 additions and 15 deletions

View File

@@ -23,21 +23,6 @@
#define MAX_TOTAL_MATCHES (256 << sizeof(char *))
#ifndef HAVE_STRDUP
/* Return an allocated copy of a string. */
char *strdup(const char *p)
{
char *new = malloc(sizeof(char) * strlen(p));
if (new) {
strcpy(new, p);
return new;
}
return NULL;
}
#endif
/* Wrap strcmp() for qsort() */
static int compare(const void *p1, const void *p2)
{