about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/arm/sys/ucontext.h3
-rw-r--r--sysdeps/generic/sys/ucontext.h3
-rw-r--r--sysdeps/i386/sys/ucontext.h3
-rw-r--r--sysdeps/m68k/sys/ucontext.h3
-rw-r--r--sysdeps/mips/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h27
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/sigstack.h27
-rw-r--r--sysdeps/unix/sysv/linux/alpha/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/arm/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/bits/sigstack.h27
-rw-r--r--sysdeps/unix/sysv/linux/bits/ss_flags.h (renamed from sysdeps/unix/sysv/linux/mips/bits/sigstack.h)34
-rw-r--r--sysdeps/unix/sysv/linux/bits/types/stack_t.h33
-rw-r--r--sysdeps/unix/sysv/linux/hppa/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/sigstack.h27
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h33
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/nios2/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h27
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/s390/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/sh/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/sigstack.h27
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/tile/sys/ucontext.h3
-rw-r--r--sysdeps/unix/sysv/linux/x86/sys/ucontext.h3
29 files changed, 131 insertions, 191 deletions
diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h
index 09fe418b3c..49d60395dd 100644
--- a/sysdeps/arm/sys/ucontext.h
+++ b/sysdeps/arm/sys/ucontext.h
@@ -27,6 +27,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 typedef int greg_t;
diff --git a/sysdeps/generic/sys/ucontext.h b/sysdeps/generic/sys/ucontext.h
index 6c475b5a4a..052c5401cb 100644
--- a/sysdeps/generic/sys/ucontext.h
+++ b/sysdeps/generic/sys/ucontext.h
@@ -29,6 +29,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 typedef struct sigcontext mcontext_t;
diff --git a/sysdeps/i386/sys/ucontext.h b/sysdeps/i386/sys/ucontext.h
index c632e50eba..241f270a99 100644
--- a/sysdeps/i386/sys/ucontext.h
+++ b/sysdeps/i386/sys/ucontext.h
@@ -27,6 +27,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 /* Type for general register.  */
diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h
index cbec1db5d6..4e5ec3b090 100644
--- a/sysdeps/m68k/sys/ucontext.h
+++ b/sysdeps/m68k/sys/ucontext.h
@@ -27,6 +27,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 /* Type for general register.  */
diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h
index 137246f961..cb8fbcd3d2 100644
--- a/sysdeps/mips/sys/ucontext.h
+++ b/sysdeps/mips/sys/ucontext.h
@@ -27,6 +27,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 #include <sgidefs.h>
 
diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h b/sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
index a1f2accfaa..434b24e926 100644
--- a/sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
@@ -23,33 +23,6 @@
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
-#define __need_size_t
-#include <stddef.h>
-
-/* Structure describing a signal stack (obsolete).  */
-struct sigstack
-  {
-    void *ss_sp;		/* Signal stack pointer.  */
-    int ss_onstack;		/* Nonzero if executing on this stack.  */
-  };
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
-
-/* Possible values for `ss_flags'.  */
-enum
-{
-  SS_ONSTACK = 1,
-#define SS_ONSTACK	SS_ONSTACK
-  SS_DISABLE
-#define SS_DISABLE	SS_DISABLE
-};
-
 /* Minimum stack size for a signal handler.  */
 #define MINSIGSTKSZ	5120
 
diff --git a/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h b/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
index 536404dd71..1a5fa29ce8 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
@@ -28,6 +28,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 #ifdef __USE_MISC
 # include <sys/procfs.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
index bba02126b1..9a30c9d9d5 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
@@ -23,33 +23,6 @@
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
-#define __need_size_t
-#include <stddef.h>
-
-/* Structure describing a signal stack (obsolete).  */
-struct sigstack
-  {
-    __ptr_t ss_sp;		/* Signal stack pointer.  */
-    int ss_onstack;		/* Nonzero if executing on this stack.  */
-  };
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    __ptr_t ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
-
-/* Possible values for `ss_flags'.  */
-enum
-{
-  SS_ONSTACK = 1,
-#define SS_ONSTACK	SS_ONSTACK
-  SS_DISABLE
-#define SS_DISABLE	SS_DISABLE
-};
-
 /* Minimum stack size for a signal handler.  */
 #define MINSIGSTKSZ	4096
 
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
index dc76e49190..912c61c841 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
@@ -25,6 +25,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 /* Type for general register.  */
diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
index aedeccdabe..8a5ea71a20 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
@@ -27,6 +27,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 #ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/bits/sigstack.h b/sysdeps/unix/sysv/linux/bits/sigstack.h
index a0c3a9f50d..e6b6c7edcf 100644
--- a/sysdeps/unix/sysv/linux/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/bits/sigstack.h
@@ -23,33 +23,6 @@
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
-#define __need_size_t
-#include <stddef.h>
-
-/* Structure describing a signal stack (obsolete).  */
-struct sigstack
-  {
-    void *ss_sp;		/* Signal stack pointer.  */
-    int ss_onstack;		/* Nonzero if executing on this stack.  */
-  };
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
-
-/* Possible values for `ss_flags'.  */
-enum
-{
-  SS_ONSTACK = 1,
-#define SS_ONSTACK	SS_ONSTACK
-  SS_DISABLE
-#define SS_DISABLE	SS_DISABLE
-};
-
 /* Minimum stack size for a signal handler.  */
 #define MINSIGSTKSZ	2048
 
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h b/sysdeps/unix/sysv/linux/bits/ss_flags.h
index 215f2ff459..497b613a8c 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/bits/ss_flags.h
@@ -1,4 +1,4 @@
-/* sigstack, sigaltstack definitions.
+/* ss_flags values for stack_t.  Linux version.
    Copyright (C) 1998-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -13,34 +13,16 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
+   License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _BITS_SIGSTACK_H
-#define _BITS_SIGSTACK_H 1
+#ifndef _BITS_SS_FLAGS_H
+#define _BITS_SS_FLAGS_H 1
 
 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
-#define __need_size_t
-#include <stddef.h>
-
-/* Structure describing a signal stack (obsolete).  */
-struct sigstack
-  {
-    void *ss_sp;		/* Signal stack pointer.  */
-    int ss_onstack;		/* Nonzero if executing on this stack.  */
-  };
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    size_t ss_size;
-    int ss_flags;
-  } stack_t;
-
 /* Possible values for `ss_flags'.  */
 enum
 {
@@ -50,10 +32,4 @@ enum
 #define SS_DISABLE	SS_DISABLE
 };
 
-/* Minimum stack size for a signal handler.  */
-#define MINSIGSTKSZ	2048
-
-/* System default stack size.  */
-#define SIGSTKSZ	8192
-
-#endif /* bits/sigstack.h */
+#endif /* bits/ss_flags.h */
diff --git a/sysdeps/unix/sysv/linux/bits/types/stack_t.h b/sysdeps/unix/sysv/linux/bits/types/stack_t.h
new file mode 100644
index 0000000000..497e42b0ff
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/types/stack_t.h
@@ -0,0 +1,33 @@
+/* Define stack_t.  Linux version.
+   Copyright (C) 1998-2017 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef __stack_t_defined
+#define __stack_t_defined 1
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Structure describing a signal stack.  */
+typedef struct sigaltstack
+  {
+    void *ss_sp;
+    int ss_flags;
+    size_t ss_size;
+  } stack_t;
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
index 31eb77e01b..50e585d163 100644
--- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
@@ -27,6 +27,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 #ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
index c9a068957b..c81463d809 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
@@ -26,6 +26,9 @@
 #define __need_size_t
 #include <stddef.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 struct __ia64_fpreg
   {
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h b/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
index abae4c985e..aabefbb1e3 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
@@ -23,33 +23,6 @@
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
-#define __need_size_t
-#include <stddef.h>
-
-/* Structure describing a signal stack (obsolete).  */
-struct sigstack
-  {
-    __ptr_t ss_sp;		/* Signal stack pointer.  */
-    int ss_onstack;		/* Nonzero if executing on this stack.  */
-  };
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    __ptr_t ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
-
-/* Possible values for `ss_flags'.  */
-enum
-{
-  SS_ONSTACK = 1,
-#define SS_ONSTACK	SS_ONSTACK
-  SS_DISABLE
-#define SS_DISABLE	SS_DISABLE
-};
-
 /* Minimum stack size for a signal handler.
 
    Yes, this should be 131072 but the constant got defined incorrectly
diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
index b2dab0e29e..17474a55c7 100644
--- a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
@@ -25,6 +25,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 /*
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
index 3c5dce5b73..18ff02233f 100644
--- a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
@@ -27,6 +27,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 /* Type for general register.  */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h b/sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h
new file mode 100644
index 0000000000..ef06072e94
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h
@@ -0,0 +1,33 @@
+/* Define stack_t.  MIPS Linux version.
+   Copyright (C) 1998-2017 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef __stack_t_defined
+#define __stack_t_defined 1
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Structure describing a signal stack.  */
+typedef struct sigaltstack
+  {
+    void *ss_sp;
+    size_t ss_size;
+    int ss_flags;
+  } stack_t;
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index f766dacd20..f933780dbe 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -26,6 +26,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 #include <sgidefs.h>
 
diff --git a/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h b/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
index 3b0a615abe..c961e5be40 100644
--- a/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
@@ -28,6 +28,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 /* These definitions must be in sync with the kernel.  */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
index 4a36ad1a4e..74670cb037 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
@@ -23,33 +23,6 @@
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
-#define __need_size_t
-#include <stddef.h>
-
-/* Structure describing a signal stack (obsolete).  */
-struct sigstack
-  {
-    void *ss_sp;		/* Signal stack pointer.  */
-    int ss_onstack;		/* Nonzero if executing on this stack.  */
-  };
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
-
-/* Possible values for `ss_flags'.  */
-enum
-{
-  SS_ONSTACK = 1,
-#define SS_ONSTACK	SS_ONSTACK
-  SS_DISABLE
-#define SS_DISABLE	SS_DISABLE
-};
-
 /* Minimum stack size for a signal handler.  */
 #define MINSIGSTKSZ	4096
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
index c3f9622e35..d9fad4cf8b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
@@ -26,6 +26,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 #if __WORDSIZE == 32
diff --git a/sysdeps/unix/sysv/linux/s390/sys/ucontext.h b/sysdeps/unix/sysv/linux/s390/sys/ucontext.h
index 9790c0cd7c..955a8fef9c 100644
--- a/sysdeps/unix/sysv/linux/s390/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/s390/sys/ucontext.h
@@ -26,6 +26,9 @@
    by in <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 /* Type for a program status word.  */
diff --git a/sysdeps/unix/sysv/linux/sh/sys/ucontext.h b/sysdeps/unix/sysv/linux/sh/sys/ucontext.h
index 5c6a5e4a7a..3ce381d2c6 100644
--- a/sysdeps/unix/sysv/linux/sh/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/sh/sys/ucontext.h
@@ -27,6 +27,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 typedef int greg_t;
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/sigstack.h b/sysdeps/unix/sysv/linux/sparc/bits/sigstack.h
index 4a36ad1a4e..74670cb037 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/sigstack.h
@@ -23,33 +23,6 @@
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
-#define __need_size_t
-#include <stddef.h>
-
-/* Structure describing a signal stack (obsolete).  */
-struct sigstack
-  {
-    void *ss_sp;		/* Signal stack pointer.  */
-    int ss_onstack;		/* Nonzero if executing on this stack.  */
-  };
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
-
-/* Possible values for `ss_flags'.  */
-enum
-{
-  SS_ONSTACK = 1,
-#define SS_ONSTACK	SS_ONSTACK
-  SS_DISABLE
-#define SS_DISABLE	SS_DISABLE
-};
-
 /* Minimum stack size for a signal handler.  */
 #define MINSIGSTKSZ	4096
 
diff --git a/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h b/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
index b8f3ca769e..0d6cbe6e6b 100644
--- a/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
@@ -25,6 +25,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 #include <bits/wordsize.h>
 
diff --git a/sysdeps/unix/sysv/linux/tile/sys/ucontext.h b/sysdeps/unix/sysv/linux/tile/sys/ucontext.h
index 95e6dd68f5..8fc2f13834 100644
--- a/sysdeps/unix/sysv/linux/tile/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/tile/sys/ucontext.h
@@ -26,6 +26,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 #ifdef __USE_MISC
 /* Get register type and register names. */
diff --git a/sysdeps/unix/sysv/linux/x86/sys/ucontext.h b/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
index 6dad48fb2c..5dd72acf48 100644
--- a/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
@@ -25,6 +25,9 @@
    by <signal.h>.  */
 #include <bits/sigcontext.h>
 #include <bits/sigstack.h>
+#include <bits/types/struct_sigstack.h>
+#include <bits/types/stack_t.h>
+#include <bits/ss_flags.h>
 
 
 #ifdef __x86_64__