mirror of git://sourceware.org/git/glibc.git
This patch completes the ucontext.h namespace fixes by fixing issues related to the use of struct sigcontext as mcontext_t, and inclusion of <bits/sigcontext.h> even when struct sigcontext is not so used. Inclusion of <bits/sigcontext.h> by <sys/ucontext.h> is removed; the way to get the sigcontext structure is by including <signal.h> (in a context where __USE_MISC is defined); the sysdeps/generic version of sys/ucontext.h keeps the inclusion by necessity, with a comment about how this is not namespace-clean, but the only configuration that used it, MicroBlaze, gets its own version of the header in this patch. Where mcontext_t was typedefed to struct sigcontext, the contents of struct sigcontext are inserted (with appropriate namespace handling to prefix fields with __ when __USE_MISC is not defined); review should check that this has been done correctly in each case, whether the definition of struct sigcontext comes from glibc headers or from the Linux kernel. This changes C++ name mangling on affected architectures (which do not include x86_64/x86). Tested for x86_64, and with build-many-glibcs.py. 2017-08-14 Joseph Myers <joseph@codesourcery.com> [BZ #21457] * sysdeps/arm/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/generic/sys/ucontext.h: Add comment about use of struct sigcontext and namespace requirements. * sysdeps/i386/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/m68k/sys/ucontext.h: Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. Include <bits/types.h>. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym (oEXTENSION): Use __glibc_reserved1 instead of __reserved. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym: Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym: Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): New macro. (struct __ia64_fpreg_mcontext): New type. (mcontext_t): Define structure contents rather than using struct sigcontext. (_SC_GR0_OFFSET): Use mcontext_t instead of struct sigcontext. (uc_sigmask): Define using __ctx. (uc_stack): Likewise. * sysdeps/unix/sysv/linux/ia64/sys/procfs.h: Include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h: New file. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Do not include <bits/sigcontext.h>. Include <bits/types.h>. * conform/Makefile (test-xfail-XPG42/signal.h/conform): Remove. (test-xfail-XPG42/sys/wait.h/conform): Likewise. (test-xfail-XPG42/ucontext.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise. |
||
---|---|---|
.. | ||
aarch64 | ||
alpha | ||
arm | ||
bits | ||
generic | ||
hppa | ||
i386 | ||
ia64 | ||
include | ||
m68k | ||
microblaze | ||
mips | ||
net | ||
netash | ||
netatalk | ||
netax25 | ||
neteconet | ||
netinet | ||
netipx | ||
netiucv | ||
netpacket | ||
netrom | ||
netrose | ||
nfs | ||
nios2 | ||
powerpc | ||
s390 | ||
scsi | ||
sh | ||
sparc | ||
sys | ||
tile | ||
wordsize-64 | ||
x86 | ||
x86_64 | ||
Implies | ||
Makefile | ||
Versions | ||
_G_config.h | ||
_exit.c | ||
a.out.h | ||
accept.c | ||
accept4.c | ||
access.c | ||
adjtime.c | ||
aio_misc.h | ||
aio_sigqueue.c | ||
arch-fork.h | ||
bind.c | ||
check_native.c | ||
check_pf.c | ||
clock.c | ||
clock_getcpuclockid.c | ||
clock_getres.c | ||
clock_gettime.c | ||
clock_nanosleep.c | ||
clock_settime.c | ||
close.c | ||
cmsg_nxthdr.c | ||
configure | ||
configure.ac | ||
connect.c | ||
creat.c | ||
creat64.c | ||
createthread.c | ||
default-sched.h | ||
device-nrs.h | ||
dl-brk.c | ||
dl-execstack.c | ||
dl-fxstatat64.c | ||
dl-getcwd.c | ||
dl-librecon.h | ||
dl-openat64.c | ||
dl-opendir.c | ||
dl-origin.c | ||
dl-osinfo.h | ||
dl-sbrk.c | ||
dl-sysdep.c | ||
dl-sysdep.h | ||
dl-vdso.c | ||
dl-vdso.h | ||
dl-writev.h | ||
epoll_pwait.c | ||
epoll_wait.c | ||
errqueue.h | ||
eventfd_read.c | ||
eventfd_write.c | ||
exit-thread.h | ||
faccessat.c | ||
fallocate.c | ||
fallocate64.c | ||
fatal-prepare.h | ||
fchmodat.c | ||
fcntl.c | ||
fd_to_filename.h | ||
fdatasync.c | ||
fexecve.c | ||
filter-nr-syscalls.awk | ||
fips-private.h | ||
fpathconf.c | ||
fstatfs64.c | ||
fstatvfs.c | ||
fstatvfs64.c | ||
fsync.c | ||
ftime.c | ||
ftruncate.c | ||
ftruncate64.c | ||
futex-internal.h | ||
futimens.c | ||
futimes.c | ||
futimesat.c | ||
fxstat.c | ||
fxstat64.c | ||
fxstatat.c | ||
fxstatat64.c | ||
gai_sigqueue.c | ||
gen-syscall-h.awk | ||
getclktck.c | ||
getcwd.c | ||
getdents.c | ||
getdents64.c | ||
getdirentries.c | ||
getdirentries64.c | ||
getdtsz.c | ||
getentropy.c | ||
gethostid.c | ||
getipv4sourcefilter.c | ||
getloadavg.c | ||
getlogin.c | ||
getlogin_r.c | ||
getpagesize.c | ||
getpeername.c | ||
getpriority.c | ||
getpt.c | ||
getrandom.c | ||
getrlimit.c | ||
getrlimit64.c | ||
getsockname.c | ||
getsockopt.c | ||
getsourcefilter.c | ||
getsysstats.c | ||
gettimeofday.c | ||
grantpt.c | ||
if_index.c | ||
ifaddrs.c | ||
ifreq.c | ||
internal_statvfs.c | ||
internal_statvfs64.c | ||
ipc_ops.h | ||
ipc_priv.h | ||
kernel-features.h | ||
kernel-posix-cpu-timers.h | ||
kernel-posix-timers.h | ||
kernel_sigaction.h | ||
kernel_stat.h | ||
kernel_termios.h | ||
ldd-rewrite.sed | ||
lddlibc4.c | ||
ldsodefs.h | ||
libc_fatal.c | ||
linux_fsinfo.h | ||
listen.c | ||
local-setxid.h | ||
lowlevellock-futex.h | ||
lseek.c | ||
lseek64.c | ||
lutimes.c | ||
lxstat.c | ||
lxstat64.c | ||
malloc-sysdep.h | ||
mmap.c | ||
mmap64.c | ||
mmap_internal.h | ||
mq_close.c | ||
mq_getattr.c | ||
mq_notify.c | ||
mq_open.c | ||
mq_receive.c | ||
mq_send.c | ||
mq_timedreceive.c | ||
mq_timedsend.c | ||
mq_unlink.c | ||
msgctl.c | ||
msgget.c | ||
msgrcv.c | ||
msgsnd.c | ||
msync.c | ||
nanosleep.c | ||
netlink_assert_response.c | ||
netlinkaccess.h | ||
nice.c | ||
not-cancel.h | ||
not-errno.h | ||
nptl-signals.h | ||
nscd_setup_thread.c | ||
ntp_gettime.c | ||
ntp_gettimex.c | ||
open.c | ||
open64.c | ||
open_by_handle_at.c | ||
openat.c | ||
openat64.c | ||
opendir.c | ||
opensock.c | ||
pathconf.c | ||
pathconf.h | ||
paths.h | ||
pause.c | ||
personality.c | ||
poll.c | ||
posix_fadvise.c | ||
posix_fadvise64.c | ||
posix_fallocate.c | ||
posix_fallocate64.c | ||
posix_madvise.c | ||
ppoll.c | ||
pread.c | ||
pread64.c | ||
preadv.c | ||
preadv2.c | ||
preadv64.c | ||
preadv64v2.c | ||
prlimit.c | ||
prof-freq.c | ||
profil.c | ||
pselect.c | ||
pt-raise.c | ||
pthread-pids.h | ||
pthread_getaffinity.c | ||
pthread_getcpuclockid.c | ||
pthread_getname.c | ||
pthread_kill.c | ||
pthread_setaffinity.c | ||
pthread_setname.c | ||
pthread_sigmask.c | ||
pthread_sigqueue.c | ||
ptrace.c | ||
ptsname.c | ||
pwrite.c | ||
pwrite64.c | ||
pwritev.c | ||
pwritev2.c | ||
pwritev64.c | ||
pwritev64v2.c | ||
raise.c | ||
read.c | ||
readahead.c | ||
readdir64.c | ||
readdir64_r.c | ||
readonly-area.c | ||
readv.c | ||
reboot.c | ||
recv.c | ||
recvfrom.c | ||
recvmmsg.c | ||
recvmsg.c | ||
remove.c | ||
rename.c | ||
renameat.c | ||
sa_len.c | ||
safe-fatal.h | ||
sched_getaffinity.c | ||
sched_getcpu.c | ||
sched_setaffinity.c | ||
segfault.c | ||
select.c | ||
semctl.c | ||
semget.c | ||
semop.c | ||
semtimedop.c | ||
send.c | ||
sendmmsg.c | ||
sendmsg.c | ||
sendto.c | ||
setegid.c | ||
seteuid.c | ||
setgid.c | ||
setgroups.c | ||
sethostid.c | ||
setipv4sourcefilter.c | ||
setregid.c | ||
setresgid.c | ||
setresuid.c | ||
setreuid.c | ||
setrlimit.c | ||
setrlimit64.c | ||
setsockopt.c | ||
setsourcefilter.c | ||
setuid.c | ||
shlib-versions | ||
shm-directory.c | ||
shmat.c | ||
shmctl.c | ||
shmdt.c | ||
shmget.c | ||
shutdown.c | ||
sigaction.c | ||
siglist.h | ||
signal.c | ||
signalfd.c | ||
sigpending.c | ||
sigprocmask.c | ||
sigqueue.c | ||
sigreturn.c | ||
sigset-cvt-mask.h | ||
sigsetops.h | ||
sigstack.c | ||
sigsuspend.c | ||
sigtimedwait.c | ||
sigwait.c | ||
sigwaitinfo.c | ||
sizes.h | ||
socket.c | ||
socketcall.h | ||
socketpair.c | ||
spawni.c | ||
speed.c | ||
splice.c | ||
statfs64.c | ||
statvfs.c | ||
statvfs64.c | ||
sync_file_range.c | ||
syscall-names.list | ||
syscalls.list | ||
sysconf.c | ||
sysctl.c | ||
sysctl.mk | ||
sysdep-vdso.h | ||
sysdep.h | ||
syslog.c | ||
system.c | ||
tcdrain.c | ||
tcflow.c | ||
tcflush.c | ||
tcgetattr.c | ||
tcgetpgrp.c | ||
tcsendbrk.c | ||
tcsetattr.c | ||
tcsetpgrp.c | ||
tee.c | ||
termio.h | ||
test-errno-linux.c | ||
time.c | ||
timer_create.c | ||
timer_delete.c | ||
timer_getoverr.c | ||
timer_gettime.c | ||
timer_routines.c | ||
timer_settime.c | ||
times.c | ||
timespec_get.c | ||
truncate.c | ||
truncate64.c | ||
tst-affinity-pid.c | ||
tst-affinity.c | ||
tst-align-clone.c | ||
tst-clone.c | ||
tst-clone2.c | ||
tst-clone3.c | ||
tst-fallocate-common.c | ||
tst-fallocate.c | ||
tst-fallocate64.c | ||
tst-fanotify.c | ||
tst-getpid1.c | ||
tst-personality.c | ||
tst-quota.c | ||
tst-setgetname.c | ||
tst-signal-numbers.sh | ||
tst-skeleton-affinity.c | ||
tst-skeleton-thread-affinity.c | ||
tst-sync_file_range.c | ||
tst-syscall-list.sh | ||
tst-thread-affinity-pthread.c | ||
tst-thread-affinity-pthread2.c | ||
tst-thread-affinity-sched.c | ||
ttyname.c | ||
ttyname.h | ||
ttyname_r.c | ||
ualarm.c | ||
umount.S | ||
umount2.S | ||
unlockpt.c | ||
updwtmp.c | ||
ustat.c | ||
utimensat.c | ||
utimes.c | ||
utmp_file.c | ||
vfork.c | ||
vmsplice.c | ||
wait.c | ||
wait3.c | ||
waitid.c | ||
waitpid.c | ||
write.c | ||
writev.c | ||
xmknod.c | ||
xmknodat.c | ||
xstat.c | ||
xstat64.c | ||
xstatconv.c | ||
xstatconv.h |