]> sourceware.org Git - glibc.git/commitdiff
Installed-header hygiene (BZ#20366): stack_t.
authorZack Weinberg <zackw@panix.com>
Wed, 13 Jul 2016 20:11:57 +0000 (16:11 -0400)
committerZack Weinberg <zackw@panix.com>
Fri, 23 Sep 2016 12:43:56 +0000 (08:43 -0400)
sys/ucontext.h unconditionally uses stack_t, and it does not make
sense to change that.  But signal.h only declares stack_t under
__USE_XOPEN_EXTENDED || __USE_XOPEN2K8.  The actual definition is
already in a bits header, bits/sigstack.h, but that header insists on
only being included by signal.h, so we have to change that as well as
all of the sys/ucontext.h variants.  (Some but not all variants of
bits/sigcontext.h, which sys/ucontext.h may also need, had already
received this adjustment; for consistency, I made them all the same,
even if that's not strictly necessary in some configurations.)
bits/sigcontext.h and bits/sigstack.h also all need to receive
multiple inclusion guards.

* sysdeps/generic/sys/ucontext.h
* sysdeps/arm/sys/ucontext.h
* sysdeps/i386/sys/ucontext.h
* sysdeps/m68k/sys/ucontext.h
* sysdeps/mips/sys/ucontext.h
* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
* sysdeps/unix/sysv/linux/arm/sys/ucontext.h
* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h
* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
* sysdeps/unix/sysv/linux/s390/sys/ucontext.h
* sysdeps/unix/sysv/linux/sh/sys/ucontext.h
* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
* sysdeps/unix/sysv/linux/tile/sys/ucontext.h
* sysdeps/unix/sysv/linux/x86/sys/ucontext.h:
Include both bits/sigcontext.h and bits/sigstack.h.
Fix grammar error in comment, if present.

* bits/sigstack.h
* sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
* sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
* sysdeps/unix/sysv/linux/bits/sigstack.h
* sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
* sysdeps/unix/sysv/linux/mips/bits/sigstack.h
* sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
* sysdeps/unix/sysv/linux/sparc/bits/sigstack.h
* bits/sigcontext.h
* sysdeps/mach/hurd/i386/bits/sigcontext.h
* sysdeps/unix/sysv/linux/bits/sigcontext.h
* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
* sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h:
Add multiple inclusion guard.  Permit inclusion by sys/ucontext.h
as well as signal.h, if this was not already allowed.  Request
definition of size_t if necessary.  Minimize semantically-null
differences across files.

33 files changed:
ChangeLog
bits/sigcontext.h
bits/sigstack.h
sysdeps/arm/sys/ucontext.h
sysdeps/generic/sys/ucontext.h
sysdeps/i386/sys/ucontext.h
sysdeps/m68k/sys/ucontext.h
sysdeps/mach/hurd/i386/bits/sigcontext.h
sysdeps/mips/sys/ucontext.h
sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
sysdeps/unix/sysv/linux/arm/sys/ucontext.h
sysdeps/unix/sysv/linux/bits/sigcontext.h
sysdeps/unix/sysv/linux/bits/sigstack.h
sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
sysdeps/unix/sysv/linux/mips/bits/sigstack.h
sysdeps/unix/sysv/linux/mips/sys/ucontext.h
sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
sysdeps/unix/sysv/linux/s390/sys/ucontext.h
sysdeps/unix/sysv/linux/sh/sys/ucontext.h
sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h
sysdeps/unix/sysv/linux/sparc/bits/sigstack.h
sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
sysdeps/unix/sysv/linux/tile/sys/ucontext.h
sysdeps/unix/sysv/linux/x86/sys/ucontext.h

index b428ba42ee7b5e3e6eae0f9b04bf634518b5d205..47ea83666f7844f07131941e58dced76afe27339 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+2016-09-23  Zack Weinberg  <zackw@panix.com>
+
+       * sysdeps/generic/sys/ucontext.h
+       * sysdeps/arm/sys/ucontext.h
+       * sysdeps/i386/sys/ucontext.h
+       * sysdeps/m68k/sys/ucontext.h
+       * sysdeps/mips/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/s390/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/sh/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/tile/sys/ucontext.h
+       * sysdeps/unix/sysv/linux/x86/sys/ucontext.h:
+       Include both bits/sigcontext.h and bits/sigstack.h.
+       Fix grammar error in comment, if present.
+
+       * bits/sigstack.h
+       * sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
+       * sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
+       * sysdeps/unix/sysv/linux/bits/sigstack.h
+       * sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
+       * sysdeps/unix/sysv/linux/mips/bits/sigstack.h
+       * sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
+       * sysdeps/unix/sysv/linux/sparc/bits/sigstack.h
+       * bits/sigcontext.h
+       * sysdeps/mach/hurd/i386/bits/sigcontext.h
+       * sysdeps/unix/sysv/linux/bits/sigcontext.h
+       * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
+       * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h:
+       Add multiple inclusion guard.  Permit inclusion by sys/ucontext.h
+       as well as signal.h, if this was not already allowed.  Request
+       definition of size_t if necessary.  Minimize semantically-null
+       differences across files.
+
 2016-09-23  Zack Weinberg  <zackw@panix.com>
 
        * time/time.h, bits/time.h, sysdeps/unix/sysv/linux/bits/time.h:
index 85b2a96d9f8e4f2bd4c2417cf553e9c500b8d561..ddc4966d6b87e23ba053cfc3bc2c33bd530724a4 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
 #endif
 
@@ -30,3 +33,5 @@ struct sigcontext
   };
 
 /* Signal subcodes should be defined here.  */
+
+#endif /* bits/sigcontext.h */
index b4b911e7d1cb92b3d2b3b5a08d3e6f1a575cd63b..62020b396e099b719c9339e91d4bd0d2856f6266 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
@@ -52,3 +55,5 @@ enum
 
 /* System default stack size.  */
 #define SIGSTKSZ       (MINSIGSTKSZ + 32768)
+
+#endif /* bits/sigstack.h */
index 744cb538cf439a81e59b79a25a27bfd127527c66..28bf860100171ef16651cf3652b1ee9ade448a82 100644 (file)
 #include <features.h>
 #include <signal.h>
 
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
+#include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
+
 typedef int greg_t;
 
 /* Number of general registers.  */
index f08cec04cc9559081391be94aca9faefa4232989..b5ec972a910f2753e09dc60db4780927bb246024 100644 (file)
 #include <features.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
 
 typedef struct sigcontext mcontext_t;
 
index d08e1a7f5668a54b9a85d832c8f70f531e6f8f62..882173ba577656420273e6c0c443f518710f95c2 100644 (file)
 #include <features.h>
 #include <signal.h>
 
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
+#include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
+
 /* Type for general register.  */
 typedef int greg_t;
 
index ef85368cb2bd0a067b6d9361333076726732e608..1c363a8c311ca5dc102d410cf0d4c7470ed5915b 100644 (file)
 #include <features.h>
 #include <signal.h>
 
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
+#include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
+
 /* Type for general register.  */
 typedef int greg_t;
 
index 6d15b039ef69dca61b5ca61dde878e1bc00e26a8..73585e18d1d08ea866006132faea16fc3df25e73 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
 #endif
 
-#ifndef sc_pc
-
 /* Signal handlers are actually called:
    void handler (int sig, int code, struct sigcontext *scp);  */
 
@@ -116,4 +117,4 @@ struct sigcontext
 #define DBG_SINGLE_TRAP                0x1 /* single step */
 #define DBG_BRKPNT_FAULT       0x2 /* breakpoint instruction */
 
-#endif /* sc_pc */
+#endif /* bits/sigcontext.h */
index b3d752bc466c170fefc99278ad4575ae805a2d81..89970a833729ef5d2de86089aa08a222a51f0e32 100644 (file)
 #define _SYS_UCONTEXT_H        1
 
 #include <features.h>
-#include <sgidefs.h>
 #include <signal.h>
 
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
+#include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
+#include <sgidefs.h>
+
+
 /* Type for general register.  */
 #if _MIPS_SIM == _ABIO32
 typedef __uint32_t greg_t;
index 5b09b7c8c38971ec36ea413d4688809db59a1639..cb3e97d90dfb00b4e0f63f7d888dbc593912ded4 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_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
@@ -28,8 +33,15 @@ struct sigstack
     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.'.  */
+/* Possible values for `ss_flags'.  */
 enum
 {
   SS_ONSTACK = 1,
@@ -44,11 +56,4 @@ enum
 /* System default stack size.  */
 #define SIGSTKSZ       16384
 
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
+#endif /* bits/sigstack.h */
index 01da3ca858e2b8fad10a10c191218ae9218c166b..2e3e1ee87d7928cc9aa623b22791bbf5d4c75eea 100644 (file)
 
 #include <features.h>
 #include <signal.h>
-#include <sys/procfs.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
+#include <sys/procfs.h>
+
 
 typedef elf_greg_t greg_t;
 
index 6ad3363ddf0571560bbb8003741d93cca3e0d4ed..b2de7a1d3e97a61c1496a921d66dba5a021f1629 100644 (file)
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_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
@@ -28,8 +33,15 @@ struct sigstack
     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.'.  */
+/* Possible values for `ss_flags'.  */
 enum
 {
   SS_ONSTACK = 1,
@@ -44,11 +56,4 @@ enum
 /* System default stack size.  */
 #define SIGSTKSZ       16384
 
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    __ptr_t ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
+#endif /* bits/sigstack.h */
index a42e662cf5f6a09e521020402492753cae2ede04..0fa4c1f996b02c0748dd26089b0fca5ca2078328 100644 (file)
 #include <features.h>
 #include <signal.h>
 
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
 
 
 /* Type for general register.  */
index f32eadc099768fdcbacc4dd05b127bbb1a909d2c..c7aceadb7d33c428eb4eec1d7dfa2c2599f0b236 100644 (file)
 #include <features.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
 
 typedef int greg_t;
 
index 46cacb7b2c6f51fbd00990cce18235d11a029bee..bdeaae8ad29e517ce5cdac4178b23201002d66e4 100644 (file)
@@ -15,6 +15,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
 #endif
@@ -30,3 +33,5 @@
 # define __need_NULL
 # include <stddef.h>
 #endif
+
+#endif /* bits/sigcontext.h */
index 115a98ec6b77018257046751d9dad81b3acebb99..d858f09b73fc0f594ee1daa892a10f3ec3950d2a 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_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
@@ -28,8 +33,15 @@ struct sigstack
     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.'.  */
+/* Possible values for `ss_flags'.  */
 enum
 {
   SS_ONSTACK = 1,
@@ -44,11 +56,4 @@ enum
 /* System default stack size.  */
 #define SIGSTKSZ       8192
 
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
+#endif /* bits/sigstack.h */
index f6fd367bd9670c934840066745c46db5aa690dc6..fa2bd8c048b865c3365a06c55fe6844b69b87687 100644 (file)
 #include <features.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
 
 
 /* Type for general register.  */
index 591e7a22f0d436b16334e3daa31ecd7cacd2f7a4..af15ee856bb28034c943391836bdb4fadb684ce6 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
 #endif
 
-#ifndef _BITS_SIGCONTEXT_H
-#define _BITS_SIGCONTEXT_H 1
-
 #define __need_size_t
 #include <stddef.h>
 #include <bits/sigstack.h>
index 0cd5e840432bad8dd1cc0fc2138e461ffd37d3d3..f22e503f4840f581581bc77a41a0414a144b6f70 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 # error "Never include this file directly.  Use <signal.h> instead"
 #endif
 
-#ifndef _SIGSTACK_H
-#define _SIGSTACK_H    1
+#define __need_size_t
+#include <stddef.h>
 
 /* Structure describing a signal stack (obsolete).  */
 struct sigstack
@@ -30,8 +33,15 @@ struct sigstack
     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.'.  */
+/* Possible values for `ss_flags'.  */
 enum
 {
   SS_ONSTACK = 1,
@@ -50,13 +60,4 @@ enum
 /* System default stack size.  */
 #define SIGSTKSZ       262144
 
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    __ptr_t ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
-
-#endif /* bits/sigstack.h */
+#endif /* bits/sigstack.h */
index c79fced452884c3a645c427bc107abc18fb97a7b..730aa78fdab73304811263b8a2e42d5be85f0ad0 100644 (file)
 #include <features.h>
 #include <signal.h>
 
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
 
 /*
  * These are here mostly for backwards compatibility with older Unices.
index d8ee5423a516d6bd2c6342af24ff4d1b23de9f69..66f4b553079ed15a86efef39d525583db4be05c3 100644 (file)
 #include <features.h>
 #include <signal.h>
 
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
+#include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
+
 /* Type for general register.  */
 typedef int greg_t;
 
index 2e9665444a555651143c0a54d1317c05f99f7f0e..9e1ace9fddae6867162bc8102584c9fb11a19766 100644 (file)
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_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
@@ -28,8 +33,15 @@ struct sigstack
     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.'.  */
+/* Possible values for `ss_flags'.  */
 enum
 {
   SS_ONSTACK = 1,
@@ -44,11 +56,4 @@ enum
 /* System default stack size.  */
 #define SIGSTKSZ       8192
 
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    size_t ss_size;
-    int ss_flags;
-  } stack_t;
+#endif /* bits/sigstack.h */
index b5d2e2ab105bdfccc91c6c0ce177a8744b965459..1ab0c686efdba573708506bd2c5de26ec7da9caf 100644 (file)
 #define _SYS_UCONTEXT_H        1
 
 #include <features.h>
-#include <sgidefs.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
+#include <sgidefs.h>
+
 
 /* Type for general register.  Even in o32 we assume 64-bit registers,
    like the kernel.  */
index a44ec61fa072ea4730547ed05af280d223ed8bed..26c55de3124a07ff07241ce7cff8ab7f44ddc6d2 100644 (file)
 #include <features.h>
 #include <signal.h>
 
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
+#include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
+
 /* These definitions must be in sync with the kernel.  */
 
 #define MCONTEXT_VERSION 2
index 5b9c0c1be93bb924fee90532094d4e8be10988bd..b06f4393067645bd3969dc7600e73394d9a725bd 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_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
@@ -28,8 +33,15 @@ struct sigstack
     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.'.  */
+/* Possible values for `ss_flags'.  */
 enum
 {
   SS_ONSTACK = 1,
@@ -44,11 +56,4 @@ enum
 /* System default stack size.  */
 #define SIGSTKSZ       16384
 
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
+#endif /* bits/sigstack.h */
index 2b97bc71bdbf2aaaf6b9c5255c04b285bdb7ecce..c4634f68b52ac352bc71bd179255342f86168c18 100644 (file)
 #include <features.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
 
 #if __WORDSIZE == 32
 
index 78f5fd77a1de45222baba5fcf3db93b7586e52bc..0128d1fa5591080ede8df2e9f75cbf992734ce39 100644 (file)
 
 #ifndef _SYS_UCONTEXT_H
 #define _SYS_UCONTEXT_H        1
-/* Forward definition to avoid parse errors */
-struct ucontext;
-typedef struct ucontext ucontext_t;
+
 #include <features.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by in <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
 
 /* Type for a program status word.  */
 typedef struct
index ab9a7e66bf3d7625e8f4bf9855dabcfd9a7e0aeb..2c5fa0431c5940f9ffe23b6e49f9ea0335c52f96 100644 (file)
 #include <features.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
 
 
 typedef int greg_t;
index 43253f2c992a298472a88de65ccf6c0e94b284ce..8794dddfa49dff177bff15ea3dac9157783045ba 100644 (file)
@@ -15,6 +15,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
 #endif
@@ -75,3 +78,5 @@ struct sigcontext
 };
 
 #endif /* sparc64 */
+
+#endif /* bits/sigcontext.h */
index 5b9c0c1be93bb924fee90532094d4e8be10988bd..b06f4393067645bd3969dc7600e73394d9a725bd 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SIGNAL_H
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_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
@@ -28,8 +33,15 @@ struct sigstack
     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.'.  */
+/* Possible values for `ss_flags'.  */
 enum
 {
   SS_ONSTACK = 1,
@@ -44,11 +56,4 @@ enum
 /* System default stack size.  */
 #define SIGSTKSZ       16384
 
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    int ss_flags;
-    size_t ss_size;
-  } stack_t;
+#endif /* bits/sigstack.h */
index d7bf2aedb9393a3abac9585d2b0986d4d8fc2f35..5856398e622d9ae710d15c62575c34607c3072ee 100644 (file)
 
 #include <features.h>
 #include <signal.h>
+
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
+#include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
 #include <bits/wordsize.h>
 
+
 #if __WORDSIZE == 64
 
 #define MC_TSTATE      0
index d930a1fea615d6689aa3f46182ffedbfea2a292e..59c9bd1c4c7a07efeb4705dd8058b795f5dd7d18 100644 (file)
 #include <features.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
 
 /* Get register type and register names. */
 #include <arch/abi.h>
 
+
 /* Type for general register.  */
 typedef uint_reg_t greg_t;
 
index 062063526bfc0a5aba92d5a6a00a71a6a4019324..99ee9463eae160fd91f0e14ff16fa7ba6ebd2036 100644 (file)
 #include <features.h>
 #include <signal.h>
 
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
+/* We need the signal context definitions even if they are not exposed
+   by <signal.h>.  */
 #include <bits/sigcontext.h>
+#include <bits/sigstack.h>
+
 
 #ifdef __x86_64__
 
This page took 0.205012 seconds and 5 git commands to generate.