bumped version
[gnutls.git] / src / libopts / compat / strdup.c
blobe2933a8afd404bb38da5470da9a8deca727e3167
1 /*
2 * Platforms without strdup ?!?!?!
3 */
5 static char *
6 strdup( char const *s )
8 char *cp;
10 if (s == NULL)
11 return NULL;
13 cp = (char *) AGALOC((unsigned) (strlen(s)+1), "strdup");
15 if (cp != NULL)
16 (void) strcpy(cp, s);
18 return cp;