glibc/sysdeps
Joseph Myers 2288c2674d Fix bits/socket.h IOC* namespace issues (bug 21267).
sysdeps/unix/sysv/linux/bits/socket.h includes asm/socket.h.  That
includes asm/sockios.h, which on MIPS includes asm/ioctl.h, resulting
in namespace violations from IOC* macros.

bits/socket.h already has code to handle asm/socket.h unconditionally
defining macros that are only wanted for __USE_MISC.  This patch
extends it to handle the IOC* macros as well (always undefining them
if not defined when bits/socket.h was included, as I don't think they
are part of the intended API even for __USE_MISC).

It's possible there should also be a kernel fix - it's not clear to me
that IOC* belong in the uapi headers, and even if they do they might
best be split out into another header to avoid getting defined by this
particular path.  But since glibc needs to deal with existing kernel
headers, it also seems appropriate to extend the existing workaround
to these macros.

Tested (compilation only) with build-many-glibcs.py.

	[BZ #21267]
	* sysdeps/unix/sysv/linux/bits/socket.h (IOCSIZE_MASK): Undefine
	if defined by <asm/socket.h> and not previously defined.
	(IOCSIZE_SHIFT): Likewise.
	(IOC_IN): Likewise.
	(IOC_INOUT): Likewise.
	(IOC_OUT): Likewise.
2017-04-18 21:22:51 +00:00
..
aarch64 [AArch64] Update libm-test-ulps 2017-03-27 12:02:47 +01:00
alpha Consolidate pthreadtype.h placementConsolidate pthreadtype.h placement 2017-04-10 17:33:10 -03:00
arm Update arm, mips, powerpc-nofpu libm-test-ulps. 2017-02-17 23:10:01 +00:00
generic [BZ 21357] unwind-dw2-fde: Call free() outside of unwind mutex 2017-04-17 12:03:44 -03:00
gnu Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hppa hppa: Fix setting of __libc_stack_end 2017-03-15 13:37:16 -07:00
i386 Add sysdeps/x86/dl-procinfo.c 2017-04-10 12:01:45 -07:00
ia64 Allow direct use of math_ldbl.h in testsuite. 2017-02-25 10:40:48 -05:00
ieee754 Remove unneeded declarations from math_private.h 2017-04-10 12:20:47 -03:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
mach Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
microblaze Remove very old libm-test-ulps entries. 2017-01-20 23:58:49 +00:00
mips Remove _dl_platform_string 2017-03-14 17:18:52 +01:00
nacl Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
nios2 New pthread rwlock that is more scalable. 2017-01-10 11:50:17 +01:00
nptl Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
posix Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
powerpc powerpc64: strrchr optimization for power8 2017-04-18 11:28:56 +05:30
pthread Refer to <signal.h> instead of <pthread.h> in <bits/sigthread.h> 2017-02-28 10:34:15 +01:00
s390 Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
sh sh: Fix building with gcc5/6 2017-03-12 17:29:32 -03:00
sparc sparc: Fix .udiv plt on libc 2017-04-06 15:14:44 -03:00
tile tile: Check for pointer add overflow in memchr 2017-01-16 15:44:48 -05:00
unix Fix bits/socket.h IOC* namespace issues (bug 21267). 2017-04-18 21:22:51 +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: Use AVX2 memcpy/memset on Skylake server [BZ #21396] 2017-04-18 14:01:45 -07:00
x86_64 x86: Use AVX2 memcpy/memset on Skylake server [BZ #21396] 2017-04-18 14:01:45 -07:00