From 9323b58f76b756cc41b6c39b48d42b697a1bd4ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 24 Feb 2000 08:04:43 +0000 Subject: Update. * posix/sys/wait.h: Pretty printing. Allow WEXITSTATUS etc be defined elsewhere. * stdlib/stdlib.h [__USE_XOPEN]: Define WEXITSTATUS etc. * sysdeps/generic/bits/waitflags.h: Allow including from stdlib.h. * sysdeps/unix/bsd/bits/waitflags.h: Likewise. * sysdeps/unix/sysv/linux/bits/waitflags.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/waitflags.h: Likewise. * sysdeps/generic/bits/waitstatus.h: Likewise. --- posix/sys/wait.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'posix/sys/wait.h') diff --git a/posix/sys/wait.h b/posix/sys/wait.h index 5a3404d6a7..4af77b070d 100644 --- a/posix/sys/wait.h +++ b/posix/sys/wait.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,96,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,96,97,98,99, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -66,8 +66,8 @@ typedef union union wait *__uptr; int *__iptr; } __WAIT_STATUS __attribute__ ((__transparent_union__)); -# define __WAIT_STATUS_DEFN int * -#endif +# define __WAIT_STATUS_DEFN int * +# endif #else /* Don't use BSD. */ @@ -80,12 +80,14 @@ typedef union /* This will define all the `__W*' macros. */ #include -#define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status)) -#define WTERMSIG(status) __WTERMSIG(__WAIT_INT(status)) -#define WSTOPSIG(status) __WSTOPSIG(__WAIT_INT(status)) -#define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status)) -#define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status)) -#define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status)) +/* These macros could also be defined int . */ +#ifndef WEXITSTATUS +# define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status)) +# define WTERMSIG(status) __WTERMSIG(__WAIT_INT(status)) +# define WSTOPSIG(status) __WSTOPSIG(__WAIT_INT(status)) +# define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status)) +# define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status)) +# define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status)) #ifdef __USE_BSD # define WCOREFLAG __WCOREFLAG -- cgit v1.2.3