1 #include <sys/cdefs.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 #include "libc_private.h" 6 7 void 8 setprogname(const char *progname) 9 { 10 const char *p; 11 12 p = strrchr(progname, '/'); 13 if (p != NULL) 14 __progname = p + 1; 15 else 16 __progname = progname; 17 } 18