Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tools/compat Provide a default string so host tools that for...
details: https://anonhg.NetBSD.org/src/rev/9f603d87c059
branches: trunk
changeset: 521503:9f603d87c059
user: tv <tv%NetBSD.org@localhost>
date: Thu Jan 31 19:21:58 2002 +0000
description:
Provide a default string so host tools that forget to call setprogname()
won't accidentally segfault just trying to print a usage message.
diffstat:
tools/compat/setprogname.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (26 lines):
diff -r 97f3d9146b5a -r 9f603d87c059 tools/compat/setprogname.c
--- a/tools/compat/setprogname.c Thu Jan 31 19:20:14 2002 +0000
+++ b/tools/compat/setprogname.c Thu Jan 31 19:21:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setprogname.c,v 1.2 2002/01/10 05:35:42 lukem Exp $ */
+/* $NetBSD: setprogname.c,v 1.3 2002/01/31 19:21:58 tv Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -36,14 +36,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
-#ifndef HAVE_SETPROGNAME
+#if !HAVE_SETPROGNAME
#include <string.h>
-static const char *__progname;
+static const char *__progname = "command line";
void
setprogname(const char *progname)
Home |
Main Index |
Thread Index |
Old Index