From 896b672499d6a31a6caf85411bcbdde6edc57668 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 3 Jun 2008 08:34:09 +0200 Subject: use gnulib's progname module * bootstrap.conf (gnulib_modules): Add progname. * src/*.c (program_name): Remove declaration. * (main): Call set_program_name rather than setting program_name. * src/nice.c (main): Cast program_name to "(char *)". * src/prog-fprintf.c: Include "system.h" * src/system.h: Include "progname.h". * maint.mk (sc_program_name): Adjust rule. Suggestion from Eric Blake. --- src/timeout.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/timeout.c') diff --git a/src/timeout.c b/src/timeout.c index 9373cfa36..f7f9af012 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -83,8 +83,6 @@ static int term_signal = SIGTERM; /* same default as kill command. */ static int monitored_pid; static int sigs_to_ignore[NSIG]; /* so monitor can ignore sigs it resends. */ -char const *program_name; - static struct option const long_options[] = { {"signal", required_argument, NULL, 's'}, {NULL, 0, NULL, 0} @@ -224,7 +222,7 @@ main (int argc, char **argv) char *ep; initialize_main (&argc, &argv); - program_name = argv[0]; + set_program_name (argv[0]); setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); -- cgit v1.2.3-54-g00ecf