WCOREDUMP is in <sys/wait.h>
authorNiko Tyni <ntyni@debian.org>
Wed, 17 Dec 2008 20:02:51 +0000 (22:02 +0200)
committerDavid Mitchell <davem@iabyn.com>
Wed, 25 Feb 2009 22:06:04 +0000 (22:06 +0000)
Without this, $? & 128 doesn't get set properly on some (glibc) systems
when dumping core.

(cherry picked from commit de8ca8af19546d4922bab4537a72c9b2b3354009)

perl.h

diff --git a/perl.h b/perl.h
index 502f9e7..1a12fe9 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -681,6 +681,11 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
 #   include <unistd.h>
 #endif
 
+/* for WCOREDUMP */
+#ifdef I_SYS_WAIT
+#   include <sys/wait.h>
+#endif
+
 #ifdef __SYMBIAN32__
 #   undef _SC_ARG_MAX /* Symbian has _SC_ARG_MAX but no sysconf() */
 #endif