Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / libopts / compat / strdup.c
blobfbfa64f06f25d807b8d5135ac8f88ccf1c5dd8d7
1 /* $NetBSD$ */
3 /*
4 * Platforms without strdup ?!?!?!
5 */
7 static char *
8 strdup( char const *s )
10 char *cp;
12 if (s == NULL)
13 return NULL;
15 cp = (char *) AGALOC((unsigned) (strlen(s)+1), "strdup");
17 if (cp != NULL)
18 (void) strcpy(cp, s);
20 return cp;