[PATCH] sys/wait.h fix
Jakub Jelinek
jakub@redhat.com
Tue Apr 18 07:47:00 GMT 2000
Hi!
If someone does
#include <stdlib.h>
#include <sys/wait.h>
in that order and __USE_XOPEN is not defined, __WAIT_STATUS and the like
won't be defined but will be used in the header, so we get parse errors.
Triggered when compiling gcc.
2000-04-18 Jakub Jelinek <jakub@redhat.com>
* posix/sys/wait.h: Define __WAIT_STATUS and the like
either if stdlib.h was not included or __USE_XOPEN not
defined.
--- libc/posix/sys/wait.h.jj Tue Apr 18 08:13:24 2000
+++ libc/posix/sys/wait.h Tue Apr 18 16:36:35 2000
@@ -35,7 +35,7 @@ typedef __pid_t pid_t;
#endif
/* These macros could also be defined int <stdlib.h>. */
-#ifndef _STDLIB_H
+#if !defined _STDLIB_H || !defined __USE_XOPEN
/* This will define the `W*' macros for the flag
bits to `waitpid', `wait3', and `wait4'. */
# include <bits/waitflags.h>
Jakub
More information about the Libc-hacker
mailing list