use progname instead of getprogname() for portability.

This commit is contained in:
christos 2009-03-18 22:02:49 +00:00
parent 75c7534526
commit 0efea3414c
1 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.167 2009/03/01 01:49:17 christos Exp $ */
/* $NetBSD: main.c,v 1.168 2009/03/18 22:02:49 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: main.c,v 1.167 2009/03/01 01:49:17 christos Exp $";
static char rcsid[] = "$NetBSD: main.c,v 1.168 2009/03/18 22:02:49 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: main.c,v 1.167 2009/03/01 01:49:17 christos Exp $");
__RCSID("$NetBSD: main.c,v 1.168 2009/03/18 22:02:49 christos Exp $");
#endif
#endif /* not lint */
#endif
@ -676,8 +676,7 @@ siginfo(int signo)
int len;
if (getcwd(dir, sizeof(dir)) == NULL)
return;
len = snprintf(str, sizeof(str), "%s: Working in: %s\n", getprogname(),
dir);
len = snprintf(str, sizeof(str), "%s: Working in: %s\n", progname, dir);
if (len > 0)
(void)write(STDERR_FILENO, str, (size_t)len);
}