1181834Sroberto/*
2181834Sroberto * Platforms without strdup ?!?!?!
3181834Sroberto */
4181834Sroberto
5181834Srobertostatic char *
6181834Srobertostrdup( char const *s )
7181834Sroberto{
8181834Sroberto    char *cp;
9181834Sroberto
10181834Sroberto    if (s == NULL)
11181834Sroberto        return NULL;
12181834Sroberto
13181834Sroberto    cp = (char *) AGALOC((unsigned) (strlen(s)+1), "strdup");
14181834Sroberto
15181834Sroberto    if (cp != NULL)
16181834Sroberto        (void) strcpy(cp, s);
17181834Sroberto
18181834Sroberto    return cp;
19181834Sroberto}
20