]> granicus.if.org Git - strace/commitdiff
2004-10-19 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 19 Oct 2004 23:33:47 +0000 (23:33 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 19 Oct 2004 23:33:47 +0000 (23:33 +0000)
* process.c (WCOREFLAG): Define if not defined.
(W_STOPCODE, W_EXITCODE): Likewise.
Reported by Marty Leisner <mleisner@eng.mc.xerox.com>.

process.c

index 19ecebe58d82e047d9ab6c13ac583c586f8ce586..0a7f4868aff74eda155e4a77dd04cb07617785b2 100644 (file)
--- a/process.c
+++ b/process.c
@@ -1775,6 +1775,20 @@ static const struct xlat wait4_options[] = {
        { 0,            NULL            },
 };
 
+#if !defined WCOREFLAG && defined WCOREFLG
+# define WCOREFLAG WCOREFLG
+#endif
+#ifndef WCOREFLAG
+#define WCOREFLAG 0x80
+#endif
+
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig)                ((sig) << 8 | 0x7f)
+#endif
+#ifndef W_EXITCODE
+#define W_EXITCODE(ret, sig)   ((ret) << 8 | (sig))
+#endif
+
 static int
 printstatus(status)
 int status;