From 76fe441a7bf75d73962641b785f158b5cc9dc7f8 Mon Sep 17 00:00:00 2001 From: markm Date: Fri, 29 Mar 2002 22:43:43 +0000 Subject: Do not use __progname directly (except in [gs]etprogname(3)). Also, make an internal _getprogname() that is used only inside libc. For libc, getprogname(3) is a weak symbol in case a function of the same name is defined in userland. --- lib/csu/alpha/crt1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/csu/alpha/crt1.c') diff --git a/lib/csu/alpha/crt1.c b/lib/csu/alpha/crt1.c index b092c67..9a76159 100644 --- a/lib/csu/alpha/crt1.c +++ b/lib/csu/alpha/crt1.c @@ -40,6 +40,7 @@ #endif #include +#include "libc_private.h" #include "crtbrand.c" struct Struct_Obj_Entry; @@ -60,7 +61,7 @@ extern int etext; #endif char **environ; -char *__progname = ""; +const char *__progname = ""; /* The entry function. */ void @@ -72,13 +73,13 @@ _start(char **ap, int argc; char **argv; char **env; + const char *s; argc = * (long *) ap; argv = ap + 1; env = ap + 2 + argc; environ = env; if(argc > 0 && argv[0] != NULL) { - char *s; __progname = argv[0]; for (s = __progname; *s != '\0'; s++) if (*s == '/') -- cgit v1.1