From cfed8ece799b6e6540193a14b41d9de52dc3b08f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 23 May 2017 11:49:48 +0000 Subject: Fix sys/ucontext.h namespace from signal.h etc. inclusion (bug 21457). The various sys/ucontext.h headers include and all the headers split out of . (Except that the powerpc version does not include .) None of the standard versions defining ucontext.h require or permit such inclusions; rather, they all say that the stack_t and sigset_t types from signal.h are defined. This patch fixes the headers to include just the bits/ headers for those types (and the existing includes of bits/sigcontext.h). Since bits/types/sigset_t.h is now being included instead of bits/types/__sigset_t.h, __sigset_t uses in the headers are replaced by direct use of the public sigset_t type. sysdeps/unix/sysv/linux/x86/bits/sigcontext.h was relying on the prior inclusion of to define types such as __uint32_t, so gets a bits/types.h include added to provide those types. Although one could keep some or all of the includes under a __USE_MISC conditional, that seems unnecessary to me, especially given the lack of a include in the powerpc version meaning that portable programs already cannot rely on such an include. Tested for x86_64 and x86, and with build-many-glibcs.py. As with other such fixes, more namespace issues remain so this does not permit any XFAILs to be removed or bugs to be closed. [BZ #21457] * sysdeps/arm/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/generic/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/i386/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/m68k/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/mips/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Do not include , , or . Include . * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Do not include , or . * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. * sysdeps/unix/sysv/linux/x86/bits/sigcontext.h: Include . * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Do not include , , or . Include instead of . (ucontext_t): Use sigset_t instead of __sigset_t. --- sysdeps/unix/sysv/linux/ia64/sys/ucontext.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sysdeps/unix/sysv/linux/ia64') diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h index 17474a55c7..5ed6929af4 100644 --- a/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h @@ -19,15 +19,10 @@ #define _SYS_UCONTEXT_H 1 #include -#include -/* We need the signal context definitions even if they are not exposed - by . */ +#include #include -#include -#include #include -#include /* -- cgit 1.4.1