glibc/sysdeps
Joseph Myers cd65836b5f Fix XPG4.2 bits/sigaction.h namespace (bug 21899).
For XPG4.2, sa_sigaction, SA_ONSTACK, SA_RESETHAND, SA_RESTART and
SA_NODEFER should be defined in signal.h, but they are only defined
for other standards at present.

This patch fixes the various bits/sigaction.h headers accordingly.
All the fixes are essentially the same, except those for SPARC and
Tile.

For SPARC, the header (a) spuriously defined various nonstandard
macros for __USE_UNIX98 || defined __USE_XOPEN2K8 and (b) defined some
standard macros as aliases of nonstandard ones instead of the other
way round.  This patch fixes the SPARC header to handle these macros
the same way and with the same conditions as those for other
architectures, so the standard macros are the primary ones and the
other ones are defined only for __USE_MISC and are aliases of the
standard ones where applicable.

For Tile, the header spuriously defined the nonstandard macro
SA_NOPTRACE for __USE_UNIX98 || defined __USE_XOPEN2K8; this is moved
to __USE_MISC.

(Those nonstandard macros are in a reserved namespace, but it seems
desirable to be consistent between architectures as far as possible,
and so not define them in standard modes anywhere.)

Tested for x86_64, and with build-many-glibcs.py.

	[BZ #21899]
	* bits/sigaction.h (struct sigaction): Define sa_handler and
	sa_sigaction using union also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.
	(SA_RESETHAND): Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
	(struct sigaction): Define sa_handler and sa_sigaction using union
	also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.
	(SA_RESETHAND): Likewise.
	* sysdeps/unix/sysv/linux/bits/sigaction.h
	(struct sigaction): Define sa_handler and sa_sigaction using union
	also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.
	(SA_RESETHAND): Likewise.
	* sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
	(struct sigaction): Define sa_handler and sa_sigaction using union
	also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.
	(SA_RESETHAND): Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
	(struct sigaction): Define sa_handler and sa_sigaction using union
	also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.
	(SA_RESETHAND): Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/sigaction.h
	(struct sigaction): Define sa_handler and sa_sigaction using union
	also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.
	(SA_RESETHAND): Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/sigaction.h
	(struct sigaction): Define sa_handler and sa_sigaction using union
	also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.
	(SA_RESETHAND): Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
	(struct sigaction): Define sa_handler and sa_sigaction using union
	also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.  Define directly rather than as alias.
	(SA_RESETHAND): Likewise.
	(SA_INTERRUPT): Define only for [__USE_MISC].
	(SA_NOMASK): Define as alias of SA_NODEFER, only for [__USE_MISC].
	(SA_ONESHOT): Define as alias of SA_RESETHAND, only for
	[__USE_MISC].
	(SA_STACK): Define only for [__USE_MISC].
	* sysdeps/unix/sysv/linux/tile/bits/sigaction.h
	(struct sigaction): Define sa_handler and sa_sigaction using union
	also for [__USE_XOPEN_EXTENDED].
	(SA_ONSTACK): Change [__USE_UNIX98] condition to
	[__USE_XOPEN_EXTENDED].
	(SA_RESTART): Likewise.
	(SA_NODEFER): Likewise.
	(SA_RESETHAND): Likewise.
	(SA_NOPTRACE): Define only for [__USE_MISC].
2017-08-07 23:41:32 +00:00
..
aarch64 tunables, aarch64: New tunable to override cpu 2017-06-30 22:58:39 +05:30
alpha Update Alpha libm-test-ulps 2017-07-27 14:21:28 -03:00
arm [ARM] Fix ld.so crash when built using Binutils 2.29 2017-07-13 15:48:41 +01:00
generic Reimplement min_of_type using __MATH_TG. 2017-08-04 21:32:57 +00:00
gnu Regenerate sysdeps/gnu/errlist.c. 2017-06-04 15:27:14 -04:00
hppa Remove extra semicolons in struct pthread_mutex (bug 21804) 2017-07-24 12:22:05 +02:00
i386 i686: Implement IFUNC selectors in C 2017-08-04 13:29:38 -07:00
ia64 float128: Add signbit alternative for old compilers 2017-06-30 18:34:29 -03:00
ieee754 Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k Consistently use uintN_t not u_intN_t in libm. 2017-08-03 19:55:04 +00:00
mach [hurd]: Add __libc_init_secure stub 2017-08-02 23:29:57 +02:00
microblaze Update Microblaze libm-test-ulps 2017-07-28 09:19:40 -03:00
mips Rename struct ucontext tag (bug 21457). 2017-06-26 22:03:58 +00:00
nios2 Update Nios II ULPs file. 2017-07-28 03:54:35 -07:00
nptl Remove extra semicolons in struct pthread_mutex (bug 21804) 2017-07-24 12:22:05 +02:00
posix getaddrinfo: Release resolver context on error in gethosts [BZ #21885] 2017-08-03 12:33:00 +02:00
powerpc tst-tlsopt-powerpc as a shared lib 2017-08-03 15:39:21 +09:30
pthread Single threaded stdio optimization 2017-07-04 16:05:12 +01:00
s390 Require binutils 2.25 or later to build glibc. 2017-06-28 11:31:50 +00:00
sh PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY 2017-06-14 10:47:25 +09:30
sparc Update sparc ulps 2017-07-19 15:56:02 -03:00
tile PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY 2017-06-14 10:47:25 +09:30
unix Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
wordsize-32 Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
wordsize-64 Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
x86 x86: Remove assembly versions of HAS_CPU_FEATURE/HAS_ARCH_FEATURE 2017-08-04 13:38:20 -07:00
x86_64 x86-64: Add FMA multiarch functions to libm 2017-08-07 08:20:56 -07:00