summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/web2c/ChangeLog4
-rw-r--r--Build/source/texk/web2c/web2c/splitup.c23
2 files changed, 24 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog
index 74aac9826c1..622f1cb15d2 100644
--- a/Build/source/texk/web2c/web2c/ChangeLog
+++ b/Build/source/texk/web2c/web2c/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * splitup.c: avoid using program_invocation_name (from Taco).
+
2009-02-26 Karl Berry <karl@tug.org>
* texmf.defines (runsystem): new fn.
diff --git a/Build/source/texk/web2c/web2c/splitup.c b/Build/source/texk/web2c/web2c/splitup.c
index f92933c52ba..3d0dbee6929 100644
--- a/Build/source/texk/web2c/web2c/splitup.c
+++ b/Build/source/texk/web2c/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':