47 lines
1.3 KiB
Text
47 lines
1.3 KiB
Text
$NetBSD: patch-ak,v 1.3 2009/06/09 21:32:03 minskim Exp $
|
|
|
|
Avoid using program_invocation_name (r12635).
|
|
|
|
--- web2c/splitup.c.orig 2008-03-24 08:47:15.000000000 -0700
|
|
+++ web2c/splitup.c
|
|
@@ -9,11 +9,30 @@
|
|
#include "config.h"
|
|
#include <kpathsea/getopt.h>
|
|
|
|
+#if defined (FATAL)
|
|
+#undef FATAL
|
|
+#endif
|
|
+
|
|
+#define FATAL(str) do { \
|
|
+ fprintf (stderr, "%s: fatal: ", argv[0]); \
|
|
+ fputs (str, stderr); \
|
|
+ fputs (".\n", stderr); exit (1); } while (0)
|
|
+
|
|
+
|
|
+#if defined (FATAL1)
|
|
+#undef FATAL1
|
|
+#endif
|
|
+
|
|
+#define FATAL1(str, e1) do { \
|
|
+ fprintf (stderr, "%s: fatal: ", argv[0]); \
|
|
+ fprintf (stderr, str, e1); \
|
|
+ fputs (".\n", stderr); exit (1); } while (0)
|
|
+
|
|
+
|
|
#ifdef VMS
|
|
#define unlink delete
|
|
#endif
|
|
|
|
-char *program_invocation_name;
|
|
int filenumber = 0, ifdef_nesting = 0, lines_in_file = 0;
|
|
char *output_name = NULL;
|
|
boolean has_ini;
|
|
@@ -63,8 +82,6 @@ main P2C(int, argc, string *, argv)
|
|
unsigned coerce_len;
|
|
int option;
|
|
|
|
- program_invocation_name = argv[0];
|
|
-
|
|
while ((option = getopt(argc, argv, "il:")) != -1) {
|
|
switch (option) {
|
|
case 'i':
|