#ifndef HAVE_STRDUP char *strdup (const char *); #endif #ifndef HAVE_STRDUP char *strdup (char *s) { char *t = malloc (strlen (s)+1); strcpy (t, s); return t; } #endif