glibc/bits
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
..
types Fix struct sigaltstack namespace (bug 21517). 2017-06-05 10:17:46 +00:00
byteswap-16.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
byteswap.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
confname.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dirent.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dlfcn.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
elfclass.h Update. 1999-07-27 05:53:25 +00:00
endian.h Update. 1997-11-26 04:23:08 +00:00
environments.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
errno.h Remove __need macros from errno.h (__need_Emath, __need_error_t). 2017-06-14 08:14:34 -04:00
fcntl.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fenv.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fenvinline.h Update. 1999-11-11 01:05:26 +00:00
floatn.h float128: Add public _Float128 declarations to libm. 2017-05-15 10:08:56 -03:00
flt-eval-method.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fp-fast.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fp-logb.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
huge_val.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
huge_val_flt128.h float128: Add public _Float128 declarations to libm. 2017-05-15 10:08:56 -03:00
huge_valf.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
huge_vall.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hwcap.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
in.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
inf.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ioctl-types.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ioctls.h Update. 1997-11-26 04:23:08 +00:00
ipc.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ipctypes.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
iscanonical.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
libc-header-start.h Add support for testing __STDC_WANT_IEC_60559_TYPES_EXT__ 2017-05-09 11:40:28 -03:00
libm-simd-decl-stubs.h float128: Add public _Float128 declarations to libm. 2017-05-15 10:08:56 -03:00
link.h * csu/elf-init.c (__libc_csu_fini): Don't do anything here. 2005-01-06 22:40:27 +00:00
local_lim.h Update. 1997-10-15 05:34:02 +00:00
long-double.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
math-vector.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mathdef.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mathinline.h * configure.in (libc_cv_gnu89_inline): Test for -fgnu89-inline. 2007-03-17 17:04:28 +00:00
mman-linux.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mman.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mqueue.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
msq.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nan.h Update. 1997-10-15 05:34:02 +00:00
netdb.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
param.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
poll.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
posix_opt.h Update. 1997-10-15 05:34:02 +00:00
pthreadtypes.h 2002-11-10 Roland McGrath <roland@redhat.com> 2002-11-10 23:22:35 +00:00
resource.h Define struct rusage in sys/wait.h when required (bug 21575). 2017-06-19 11:59:19 +00:00
sched.h Remove __need_schedparam and __cpu_set_t_defined. 2017-06-12 17:11:36 -04:00
select.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sem.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setjmp.h Update. 1997-11-26 04:23:08 +00:00
shm.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sigaction.h Fix XPG4.2 bits/sigaction.h namespace (bug 21899). 2017-08-07 23:41:32 +00:00
sigcontext.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sigevent-consts.h Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
siginfo-consts.h Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
signum-generic.h Factor out shared definitions from bits/signum.h. 2017-06-20 20:32:50 -04:00
signum.h Factor out shared definitions from bits/signum.h. 2017-06-20 20:32:50 -04:00
sigstack.h Split up bits/sigstack.h. 2017-05-19 20:35:07 +00:00
sigthread.h Refer to <signal.h> instead of <pthread.h> in <bits/sigthread.h> 2017-02-28 10:34:15 +01:00
sockaddr.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
socket.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ss_flags.h Split up bits/sigstack.h. 2017-05-19 20:35:07 +00:00
stat.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
statfs.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
statvfs.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stdint-intn.h Fix network headers stdint.h namespace (bug 21455). 2017-05-04 20:36:42 +00:00
stdint-uintn.h Fix network headers stdint.h namespace (bug 21455). 2017-05-04 20:36:42 +00:00
stdlib-bsearch.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stropts.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sys_errlist.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
syslog-path.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sysmacros.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
termios.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
time.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
typesizes.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
uintn-identity.h Make endian-conversion macros always return correct types (bug 16458). 2017-01-11 15:28:08 +00:00
uio-ext.h Remove __need_IOV_MAX and __need_FOPEN_MAX. 2017-06-14 07:51:30 -04:00
uio_lim.h Remove __need_IOV_MAX and __need_FOPEN_MAX. 2017-06-14 07:51:30 -04:00
ustat.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
utmp.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
utsname.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
waitflags.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
waitstatus.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wchar.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wordsize.h Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00
xtitypes.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00