diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-02-24 08:04:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-02-24 08:04:43 +0000 |
commit | 9323b58f76b756cc41b6c39b48d42b697a1bd4ec (patch) | |
tree | fa61adb04ca487a090c3e8c5b4eb4b11ee4f7482 /posix | |
parent | 05d5dedc62e474ec38f2e3646037640629576313 (diff) | |
download | glibc-9323b58f76b756cc41b6c39b48d42b697a1bd4ec.tar glibc-9323b58f76b756cc41b6c39b48d42b697a1bd4ec.tar.gz glibc-9323b58f76b756cc41b6c39b48d42b697a1bd4ec.tar.bz2 glibc-9323b58f76b756cc41b6c39b48d42b697a1bd4ec.zip |
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.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/sys/wait.h | 20 |
1 files changed, 11 insertions, 9 deletions
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 <bits/waitstatus.h> -#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 <stdlib.h>. */ +#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 |