summaryrefslogtreecommitdiff
path: root/conform
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-05-23 16:47:29 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-05-23 16:47:29 +0000
commit666c0c5efa6db73632a6894bf028fef9f3b60d71 (patch)
treea326647f7dbea09c8ddf1ba9a9dba13f7e77b8e1 /conform
parentcfed8ece799b6e6540193a14b41d9de52dc3b08f (diff)
Fix sigstack namespace (bug 21511).
The sigstack function was removed in the 2001 edition of POSIX, and the sigstack structure in the 2008 edition. signal.h wrongly includes those declarations even for newer POSIX versions. This patch fixes the conditions, and conform/ expectations, accordingly. This patch makes the minimum change to when these declarations are present, leaving them visible for __USE_MISC as they would previously have been visible by default. Arguably these legacy declarations should only be visible when an old standard is specifically requested, but implementing that would require arranging for the various sigstack implementations to be able to see the struct sigstack type despite it not being in _GNU_SOURCE in that case. Tested for x86_64. [BZ #21511] * signal/signal.h: Include <bits/types/struct_sigstack.h> only if [(__USE_XOPEN_EXTENDED && !__USE_XOPEN2K8) || __USE_MISC]. (sigstack): Declare only if [(__USE_XOPEN_EXTENDED && !__USE_XOPEN2K) || __USE_MISC]. * conform/data/signal.h-data (struct sigstack): Expect type only if [!XOPEN2K8 && !POSIX2008]. (sigstack): Expect function only if [XPG42 || UNIX98].
Diffstat (limited to 'conform')
-rw-r--r--conform/data/signal.h-data4
1 files changed, 3 insertions, 1 deletions
diff --git a/conform/data/signal.h-data b/conform/data/signal.h-data
index 3651e86ae1..8fbe3ac55d 100644
--- a/conform/data/signal.h-data
+++ b/conform/data/signal.h-data
@@ -141,10 +141,12 @@ element stack_t {void*} ss_sp
element stack_t size_t ss_size
element stack_t int ss_flags
+# if !defined XOPEN2K8 && !defined POSIX2008
type {struct sigstack}
element {struct sigstack} int ss_onstack
element {struct sigstack} {void*} ss_sp
+# endif
# endif
# ifndef XPG4
@@ -249,7 +251,7 @@ function int sigqueue (pid_t, int, const union sigval)
function int sigrelse (int)
function void (*sigset (int, void(*)(int)))(int)
# endif
-# if !defined POSIX
+# if defined XPG42 || defined UNIX98
function int sigstack (struct sigstack*, struct sigstack*)
# endif
function int sigsuspend (const sigset_t*)