Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make prefix errors with the program name.
details: https://anonhg.NetBSD.org/src/rev/211964b08982
branches: trunk
changeset: 485024:211964b08982
user: christos <christos%NetBSD.org@localhost>
date: Sun Apr 16 23:24:23 2000 +0000
description:
prefix errors with the program name.
diffstat:
usr.bin/make/main.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (54 lines):
diff -r e6f044d71f46 -r 211964b08982 usr.bin/make/main.c
--- a/usr.bin/make/main.c Sun Apr 16 23:24:04 2000 +0000
+++ b/usr.bin/make/main.c Sun Apr 16 23:24:23 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.52 2000/04/14 06:11:09 simonb Exp $ */
+/* $NetBSD: main.c,v 1.53 2000/04/16 23:24:23 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -39,7 +39,7 @@
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: main.c,v 1.52 2000/04/14 06:11:09 simonb Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.53 2000/04/16 23:24:23 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -51,7 +51,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.52 2000/04/14 06:11:09 simonb Exp $");
+__RCSID("$NetBSD: main.c,v 1.53 2000/04/16 23:24:23 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -147,6 +147,7 @@
static char *curdir; /* startup directory */
static char *objdir; /* where we chdir'ed to */
+static char *progname; /* the program name */
/*-
* MainParseArgs --
@@ -477,6 +478,10 @@
/* avoid faults on read-only strings */
static char syspath[] = _PATH_DEFSYSPATH;
+ if ((progname = strrchr(argv[0], '/')) != NULL)
+ progname++;
+ else
+ progname = argv[0];
#ifdef RLIMIT_NOFILE
/*
* get rid of resource limit on file descriptors
@@ -1094,6 +1099,7 @@
va_start(ap);
fmt = va_arg(ap, char *);
#endif
+ fprintf(stderr, "%s: ", progname);
(void)vfprintf(stderr, fmt, ap);
va_end(ap);
(void)fprintf(stderr, "\n");
Home |
Main Index |
Thread Index |
Old Index