2013-09-26 17:14:40 +02:00

37 lines
878 B
Plaintext

$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);