amd64: declare initializecpu outside of SMP
[dragonfly.git] / lib / libc / gen / setprogname.c
blob5779b66d6afbc1f715bd463ae8f2a7a7e78bc604
1 /*
2 * $FreeBSD: src/lib/libc/gen/setprogname.c,v 1.1.2.4 2002/02/11 01:18:35 dd Exp $
3 * $DragonFly: src/lib/libc/gen/setprogname.c,v 1.2 2003/06/17 04:26:42 dillon Exp $
4 */
6 #include <stdlib.h>
7 #include <string.h>
9 extern const char *__progname;
11 void
12 setprogname(const char *progname)
14 const char *p;
16 p = strrchr(progname, '/');
17 if (p != NULL)
18 __progname = p + 1;
19 else
20 __progname = progname;