1181834Sroberto/* 2181834Sroberto * Platforms without strdup ?!?!?! 3181834Sroberto */ 4181834Sroberto 5181834Srobertostatic char * 6280849Scystrdup( char const *s ); 7280849Scy 8280849Scystatic char * 9181834Srobertostrdup( char const *s ) 10181834Sroberto{ 11181834Sroberto char *cp; 12181834Sroberto 13181834Sroberto if (s == NULL) 14181834Sroberto return NULL; 15181834Sroberto 16181834Sroberto cp = (char *) AGALOC((unsigned) (strlen(s)+1), "strdup"); 17181834Sroberto 18181834Sroberto if (cp != NULL) 19181834Sroberto (void) strcpy(cp, s); 20181834Sroberto 21181834Sroberto return cp; 22181834Sroberto} 23