]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix a bug in 'Remove __need macros from signal.h' (a992f506)
authorZack Weinberg <zackw@panix.com>
Tue, 23 May 2017 02:28:09 +0000 (22:28 -0400)
committerZack Weinberg <zackw@panix.com>
Tue, 23 May 2017 02:32:09 +0000 (22:32 -0400)
siginfo-arch.h is included in two different places, so the default
definitions of the macros that it might or might not define need to
be done conditionally afterward, not unconditionally beforehand.

* sysdeps/unix/sysv/linux/bits/siginfo-consts.h
(__SI_ASYNCIO_AFTER_SIGIO): Define default after including
bits/siginfo-arch.h, only if not already defined.
* sysdeps/unix/sysv/linux/bits/types/siginfo_t.h
(__SI_ALIGNMENT, __SI_BAND_TYPE, __SI_CLOCK_T)
(__SI_ERRNO_THEN_CODE, __SI_HAVE_SIGSYS, __SI_SEGFAULT_ADDL):
Likewise.

* sysdeps/unix/sysv/linux/ia64/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/mips/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/tile/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h:
Unconditionally define __SI_* macros.

ChangeLog
sysdeps/unix/sysv/linux/bits/siginfo-consts.h
sysdeps/unix/sysv/linux/bits/types/siginfo_t.h
sysdeps/unix/sysv/linux/ia64/bits/siginfo-arch.h
sysdeps/unix/sysv/linux/mips/bits/siginfo-arch.h
sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h
sysdeps/unix/sysv/linux/tile/bits/siginfo-arch.h
sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h

index dde43e08f57a1466c9038ecd08106faabb3f08f5..f432020496dcf1c00a44ffd6c814afde82da0b1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2017-05-22  Zack Weinberg  <zackw@panix.com>
+
+       * sysdeps/unix/sysv/linux/bits/siginfo-consts.h
+       (__SI_ASYNCIO_AFTER_SIGIO): Define default after including
+       bits/siginfo-arch.h, only if not already defined.
+       * sysdeps/unix/sysv/linux/bits/types/siginfo_t.h
+       (__SI_ALIGNMENT, __SI_BAND_TYPE, __SI_CLOCK_T)
+       (__SI_ERRNO_THEN_CODE, __SI_HAVE_SIGSYS, __SI_SEGFAULT_ADDL):
+       Likewise.
+
+       * sysdeps/unix/sysv/linux/ia64/bits/siginfo-arch.h
+       * sysdeps/unix/sysv/linux/mips/bits/siginfo-arch.h
+       * sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h
+       * sysdeps/unix/sysv/linux/tile/bits/siginfo-arch.h
+       * sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h:
+       Unconditionally define __SI_* macros.
+
 2017-05-22  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        [BZ #21393]
index a7a31bfe5f347b7ffb75a340203e0f37b4b26fba..525840cea1d32f3b9a061e37a68b4ec797ff93e1 100644 (file)
 
 /* Most of these constants are uniform across all architectures, but there
    is one exception.  */
-#define __SI_ASYNCIO_AFTER_SIGIO 1
 #include <bits/siginfo-arch.h>
+#ifndef __SI_ASYNCIO_AFTER_SIGIO
+# define __SI_ASYNCIO_AFTER_SIGIO 1
+#endif
 
 /* Values for `si_code'.  Positive values are reserved for kernel-generated
    signals.  */
index 1bb6da526433212e06ce27eb2c28f2bc1b68598d..bed69148f9df08a212f080fc816b0ee11fc47923 100644 (file)
 #endif
 
 /* Some fields of siginfo_t have architecture-specific variations.  */
-#define __SI_ALIGNMENT         /* nothing */
-#define __SI_BAND_TYPE         long int
-#define __SI_CLOCK_T           __clock_t
-#define __SI_ERRNO_THEN_CODE   1
-#define __SI_HAVE_SIGSYS       1
-#define __SI_SIGFAULT_ADDL     /* nothing */
 #include <bits/siginfo-arch.h>
+#ifndef __SI_ALIGNMENT
+# define __SI_ALIGNMENT                /* nothing */
+#endif
+#ifndef __SI_BAND_TYPE
+# define __SI_BAND_TYPE                long int
+#endif
+#ifndef __SI_CLOCK_T
+# define __SI_CLOCK_T          __clock_t
+#endif
+#ifndef __SI_ERRNO_THEN_CODE
+# define __SI_ERRNO_THEN_CODE  1
+#endif
+#ifndef __SI_HAVE_SIGSYS
+# define __SI_HAVE_SIGSYS      1
+#endif
+#ifndef __SI_SIGFAULT_ADDL
+# define __SI_SIGFAULT_ADDL    /* nothing */
+#endif
 
 typedef struct
   {
index f824adb77a3de89b7c7bc1d47475894c9d1670c8..8b5647062c9cab18d3e146130f63ab06c663f056 100644 (file)
@@ -1,10 +1,8 @@
 /* Architecture-specific adjustments to siginfo_t.  ia64 version.  */
 #ifndef _BITS_SIGINFO_ARCH_H
 
-#undef __SI_HAVE_SIGSYS
 #define __SI_HAVE_SIGSYS 0
 
-#undef __SI_SIGFAULT_ADDL
 #define __SI_SIGFAULT_ADDL                     \
   int _si_imm;                                 \
   unsigned int _si_flags;                      \
index 4292d7c9cdfdb277ca188fbfafa182f12bbfcf8a..cd3af7db06ba425373ee68ec302e7ea2b5e6ac01 100644 (file)
@@ -4,12 +4,10 @@
 
 /* MIPS has the si_code and si_errno fields in the opposite order from
    all other architectures.  */
-#undef __SI_ERRNO_THEN_CODE
 #define __SI_ERRNO_THEN_CODE 0
 
 /* MIPS also has different values for SI_ASYNCIO, SI_MESGQ, and SI_TIMER
    than all other architectures.  */
-#undef __SI_ASYNCIO_AFTER_SIGIO
 #define __SI_ASYNCIO_AFTER_SIGIO 0
 
 #endif
index 92fe30f11e9a5a509425f317692233a7a43853d7..9f79715ebe6c94828bb383be5edee5f2a1ea2007 100644 (file)
@@ -2,10 +2,8 @@
 #ifndef _BITS_SIGINFO_ARCH_H
 #define _BITS_SIGINFO_ARCH_H 1
 
-#undef __SI_BAND_TYPE
 #define __SI_BAND_TYPE int
 
-#undef __SI_SIGFAULT_ADDL
 #define __SI_SIGFAULT_ADDL \
   int _si_trapno;
 
index 013ad7187d11d9d189fe05d18fa3ddf3674c1d75..7d0c24c84b94bab6c5ebe3ff8e835beae959be27 100644 (file)
@@ -2,7 +2,6 @@
 #ifndef _BITS_SIGINFO_ARCH_H
 #define _BITS_SIGINFO_ARCH_H 1
 
-#undef __SI_SIGFAULT_ADDL
 #define __SI_SIGFAULT_ADDL \
   int _si_trapno;
 
index 6c85dbb6e80e71a5cda2c9da0878926ad5e7504d..7688a8d66d6e6ea790a54414500774664fa28e0a 100644 (file)
@@ -10,9 +10,7 @@
    attribute would be ignored if it were put in __SI_CLOCK_T instead
    of encapsulated in a typedef.  */
 typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
-# undef  __SI_ALIGNMENT
 # define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
-# undef  __SI_CLOCK_T
 # define __SI_CLOCK_T __sigchld_clock_t
 #endif