pkgsrc/print/teTeX3-bin/patches/patch-af
hubertf 8c77117e05 Import teTeX-bin-3.0: TeX distribution for UNIX compatible systems - binaries
This package contains the executables for the teTeX installation
as well as other files that were created when generating the binaries:
info files, format files and manual pages.
2005-03-31 22:09:18 +00:00

36 lines
878 B
Text

$NetBSD: patch-af,v 1.1.1.1 2005/03/31 22:09:18 hubertf Exp $
--- texk/web2c/lib/coredump.c.orig Thu Jan 16 13:51:12 1997
+++ texk/web2c/lib/coredump.c
@@ -9,6 +9,7 @@
you. Perl has some things to say about these days. */
#include "config.h"
+#include "ac_config.h"
/* Do not try to compile this Unix-y unportable stuff unless it's needed. */
@@ -29,7 +30,11 @@ funny_core_dump P1H(void)
}
#else /* !__EMX__ */
int pid, w;
+#ifdef HAVE_SYS_WAIT_H
+ int status;
+#else
union wait status;
+#endif
switch (pid = fork ())
{
@@ -48,7 +53,11 @@ funny_core_dump P1H(void)
default: /* parent */
while ((w = wait (&status)) != pid && w != -1)
;
+#ifdef HAVE_SYS_WAIT_H
+ if (WCOREDUMP(status))
+#else
if (status.w_coredump)
+#endif
exit (0);
(void) write (2, "attempt to dump core failed\n", 28);
exit (1);