From 21cbb6fe887a30f0777521ec10f0d0d9c2a7da7e Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 13 Mar 2015 21:03:10 +0100 Subject: unistd.h: put getppid under XOPEN2K8 Add __LEAF to all __THROW, introduce non-leaf __THROWNL Adjust affected spots accordingly. Signed-off-by: Bernhard Reutner-Fischer --- include/sys/wait.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'include/sys/wait.h') diff --git a/include/sys/wait.h b/include/sys/wait.h index b3c2b973a..f7a420b93 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -28,10 +28,9 @@ __BEGIN_DECLS #include -#include /* These macros could also be defined in . */ -#if !defined _STDLIB_H || !defined __USE_XOPEN +#if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8) /* This will define the `W*' macros for the flag bits to `waitpid', `wait3', and `wait4'. */ # include @@ -97,7 +96,7 @@ typedef union #endif /* The following values are used by the `waitid' function. */ -#if defined __USE_SVID || defined __USE_XOPEN +#if defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8 typedef enum { P_ALL, /* Wait for any child. */ @@ -141,9 +140,15 @@ extern __typeof(waitpid) __waitpid_nocancel attribute_hidden; libc_hidden_proto(waitpid) #endif -#if defined __USE_SVID || defined __USE_XOPEN +#if defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8 +# ifndef __id_t_defined +# include + typedef __id_t id_t; +# define __id_t_defined +# endif # define __need_siginfo_t # include + /* Wait for a childing matching IDTYPE and ID to change the status and place appropriate information in *INFOP. If IDTYPE is P_PID, match any process whose process ID is ID. @@ -160,19 +165,20 @@ extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +struct rusage; /* Wait for a child to exit. When one does, put its status in *STAT_LOC and return its process ID. For errors return (pid_t) -1. If USAGE is not nil, store information about the child's resource usage there. If the WUNTRACED bit is set in OPTIONS, return status for stopped children; otherwise don't. */ extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options, - struct rusage * __usage) __THROW; + struct rusage * __usage) __THROWNL; #endif #ifdef __USE_BSD /* PID is like waitpid. Other args are like wait3. */ extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options, - struct rusage *__usage) __THROW; + struct rusage *__usage) __THROWNL; #endif /* Use BSD. */ #ifdef _LIBC -- cgit v1.2.3