mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Fix waitid namespace (bug 21561).
In sys/wait.h, waitid and associated constants and types are UX-shaded in XPG4.2 (so not in XPG4), and XSI-shaded in POSIX before 2008, so should be appropriately conditional in the headers. This patch fixes the conditionals accordingly. (WCONTINUED is actually still XSI-shaded in POSIX.1:2008, but W* is also reserved there without XSI-shading, so nothing special needs to be done about the conditionals on WCONTINUED to conform to POSIX.1:2008 namespace rules.) Tested for x86_64. [BZ #21561] * posix/sys/wait.h (idtype_t): Change [__USE_XOPEN] condition to [__USE_XOPEN_EXTENDED]. (id_t): Likewise. (include of <bits/types/siginfo_t.h): Likewise. (waitid): Likewise. * sysdeps/unix/sysv/linux/bits/waitflags.h (WSTOPPED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (WEXITED): Likewise. (WCONTINUED): Likewise. (WNOWAIT): Likewise. * conform/Makefile (test-xfail-XPG4/stdlib.h/conform): Remove. (test-xfail-XPG4/sys/wait.h/conform): Likewise. (test-xfail-POSIX/sys/wait.h/conform): Likewise.
This commit is contained in:
15
ChangeLog
15
ChangeLog
@ -1,5 +1,20 @@
|
|||||||
2017-06-09 Joseph Myers <joseph@codesourcery.com>
|
2017-06-09 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
[BZ #21561]
|
||||||
|
* posix/sys/wait.h (idtype_t): Change [__USE_XOPEN] condition to
|
||||||
|
[__USE_XOPEN_EXTENDED].
|
||||||
|
(id_t): Likewise.
|
||||||
|
(include of <bits/types/siginfo_t.h): Likewise.
|
||||||
|
(waitid): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/bits/waitflags.h (WSTOPPED): Condition
|
||||||
|
on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8].
|
||||||
|
(WEXITED): Likewise.
|
||||||
|
(WCONTINUED): Likewise.
|
||||||
|
(WNOWAIT): Likewise.
|
||||||
|
* conform/Makefile (test-xfail-XPG4/stdlib.h/conform): Remove.
|
||||||
|
(test-xfail-XPG4/sys/wait.h/conform): Likewise.
|
||||||
|
(test-xfail-POSIX/sys/wait.h/conform): Likewise.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/nios2/localplt.data (__gtdf2): Mark
|
* sysdeps/unix/sysv/linux/nios2/localplt.data (__gtdf2): Mark
|
||||||
libc.so PLT entry optional.
|
libc.so PLT entry optional.
|
||||||
(__gtsf2): Likewise.
|
(__gtsf2): Likewise.
|
||||||
|
@ -162,12 +162,9 @@ test-xfail-XOPEN2K8/ndbm.h/conform = yes
|
|||||||
|
|
||||||
# Unsorted expected failures.
|
# Unsorted expected failures.
|
||||||
test-xfail-XPG4/signal.h/conform = yes
|
test-xfail-XPG4/signal.h/conform = yes
|
||||||
test-xfail-XPG4/stdlib.h/conform = yes
|
|
||||||
test-xfail-XPG4/sys/wait.h/conform = yes
|
|
||||||
test-xfail-XPG42/signal.h/conform = yes
|
test-xfail-XPG42/signal.h/conform = yes
|
||||||
test-xfail-XPG42/sys/wait.h/conform = yes
|
test-xfail-XPG42/sys/wait.h/conform = yes
|
||||||
test-xfail-XPG42/ucontext.h/conform = yes
|
test-xfail-XPG42/ucontext.h/conform = yes
|
||||||
test-xfail-POSIX/sys/wait.h/conform = yes
|
|
||||||
test-xfail-UNIX98/signal.h/conform = yes
|
test-xfail-UNIX98/signal.h/conform = yes
|
||||||
test-xfail-UNIX98/sys/wait.h/conform = yes
|
test-xfail-UNIX98/sys/wait.h/conform = yes
|
||||||
test-xfail-UNIX98/ucontext.h/conform = yes
|
test-xfail-UNIX98/ucontext.h/conform = yes
|
||||||
|
@ -64,7 +64,7 @@ typedef __pid_t pid_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The following values are used by the `waitid' function. */
|
/* The following values are used by the `waitid' function. */
|
||||||
#if defined __USE_XOPEN || defined __USE_XOPEN2K8
|
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
P_ALL, /* Wait for any child. */
|
P_ALL, /* Wait for any child. */
|
||||||
@ -104,7 +104,7 @@ extern __pid_t wait (int *__stat_loc);
|
|||||||
__THROW. */
|
__THROW. */
|
||||||
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
|
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
|
||||||
|
|
||||||
#if defined __USE_XOPEN || defined __USE_XOPEN2K8
|
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
|
||||||
# ifndef __id_t_defined
|
# ifndef __id_t_defined
|
||||||
typedef __id_t id_t;
|
typedef __id_t id_t;
|
||||||
# define __id_t_defined
|
# define __id_t_defined
|
||||||
|
@ -26,10 +26,12 @@
|
|||||||
#define WUNTRACED 2 /* Report status of stopped children. */
|
#define WUNTRACED 2 /* Report status of stopped children. */
|
||||||
|
|
||||||
/* Bits in the fourth argument to `waitid'. */
|
/* Bits in the fourth argument to `waitid'. */
|
||||||
|
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
|
||||||
# define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */
|
# define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */
|
||||||
# define WEXITED 4 /* Report dead child. */
|
# define WEXITED 4 /* Report dead child. */
|
||||||
# define WCONTINUED 8 /* Report continued child. */
|
# define WCONTINUED 8 /* Report continued child. */
|
||||||
# define WNOWAIT 0x01000000 /* Don't reap, just poll status. */
|
# define WNOWAIT 0x01000000 /* Don't reap, just poll status. */
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads
|
#define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads
|
||||||
in this group */
|
in this group */
|
||||||
|
Reference in New Issue
Block a user