From b98069b8a98c55e6954ee462e7d58c0b1d5dddfb Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Fri, 30 May 2003 20:46:11 +0000 Subject: i sent you the damn working diff, didn't i? --- lib/csu/hppa/crt0.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/csu/hppa/crt0.c b/lib/csu/hppa/crt0.c index 45ae4d796b9..38377b68741 100644 --- a/lib/csu/hppa/crt0.c +++ b/lib/csu/hppa/crt0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crt0.c,v 1.6 2003/02/28 18:05:51 deraadt Exp $ */ +/* $OpenBSD: crt0.c,v 1.7 2003/05/30 20:46:10 mickey Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -35,17 +35,16 @@ int global __asm ("$global$") = 0; int sh_func_adrs __asm ("$$sh_func_adrs") = 0; #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: crt0.c,v 1.6 2003/02/28 18:05:51 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: crt0.c,v 1.7 2003/05/30 20:46:10 mickey Exp $"; #endif /* LIBC_SCCS and not lint */ +#include #include #include #include #include #include -#include "common.h" - typedef char Obj_Entry; /* @@ -67,6 +66,9 @@ extern unsigned char etext, eprol; void __start(char **, void (*)(void), const Obj_Entry *); static char *__strrchr(const char *p, char ch); +char *__progname = ""; +char __progname_storage[NAME_MAX+1]; + void __start(sp, cleanup, obj) char **sp; @@ -84,7 +86,7 @@ __start(sp, cleanup, obj) argv = arginfo->ps_argvstr; environ = arginfo->ps_envstr; if ((namep = argv[0]) != NULL) { /* NULL ptr if argc = 0 */ - if ((__progname = _strrchr(namep, '/')) == NULL) + if ((__progname = __strrchr(namep, '/')) == NULL) __progname = namep; else __progname++; -- cgit v1.2.3