From 2c9b0d5ff2e9cafbb0ae90387fc74b312910d2cf Mon Sep 17 00:00:00 2001 From: simokawa Date: Tue, 19 Jan 1999 06:58:31 +0000 Subject: Initialize __progname by argv[0] before striping leading path, otherwise we always get empty name. --- lib/csu/alpha/crt1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/csu') diff --git a/lib/csu/alpha/crt1.c b/lib/csu/alpha/crt1.c index 5a02285..ac87526 100644 --- a/lib/csu/alpha/crt1.c +++ b/lib/csu/alpha/crt1.c @@ -30,7 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: crt1.c,v 1.2 1998/08/20 21:37:22 jb Exp $ + * $Id: crt1.c,v 1.3 1999/01/07 20:18:18 steve Exp $ */ #ifndef __GNUC__ @@ -82,6 +82,7 @@ _start(char **ap, environ = env; if(argc > 0 && argv[0] != NULL) { char *s; + __progname = argv[0]; for (s = __progname; *s != '\0'; s++) if (*s == '/') __progname = s + 1; -- cgit v1.1