This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] sys/wait.h fix


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]