From 231a59ce2c5719d2d77752c21092960e28837b4a Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 22 May 2017 22:28:09 -0400 Subject: Fix a bug in 'Remove __need macros from signal.h' (a992f506) 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. --- sysdeps/unix/sysv/linux/bits/siginfo-consts.h | 4 +++- sysdeps/unix/sysv/linux/bits/types/siginfo_t.h | 24 ++++++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) (limited to 'sysdeps/unix/sysv/linux/bits') diff --git a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h index a7a31bf..525840c 100644 --- a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h +++ b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h @@ -25,8 +25,10 @@ /* Most of these constants are uniform across all architectures, but there is one exception. */ -#define __SI_ASYNCIO_AFTER_SIGIO 1 #include +#ifndef __SI_ASYNCIO_AFTER_SIGIO +# define __SI_ASYNCIO_AFTER_SIGIO 1 +#endif /* Values for `si_code'. Positive values are reserved for kernel-generated signals. */ diff --git a/sysdeps/unix/sysv/linux/bits/types/siginfo_t.h b/sysdeps/unix/sysv/linux/bits/types/siginfo_t.h index 1bb6da5..bed6914 100644 --- a/sysdeps/unix/sysv/linux/bits/types/siginfo_t.h +++ b/sysdeps/unix/sysv/linux/bits/types/siginfo_t.h @@ -13,13 +13,25 @@ #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 +#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 { -- cgit v1.1