glibc/sysdeps
Adhemerval Zanella 01061a7cab Consolidate Linux accept implementation
This patch consolidates the accept Linux syscall implementation on
sysdeps/unix/sysv/linux/accept.c.  The changes are:

  1. Remove accept from auto-generation syscalls.list on the architecture
     that uses __NR_accept.
  2. Define __NR_accept as default (__ASSUME_ACCEPT_SYSCALL) and undef for
     architectures that do not support it.
  3. Remove __ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL and decide to use
     __NR_accept4 for accept generation based on __ASSUME_ACCEPT4_SYSCALL.

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.

	* sysdeps/unix/sysv/linux/accept.c (__libc_accept): Replace
	__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL by __ASSUME_ACCEPT4_SYSCALL.
	* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove accept from
	auto-generation list.
	* sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/i386/kernel-features.h
	(__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Remove define.
	(__ASSUME_ACCEPT_SYSCALL): Undefine.
	* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_ACCEPT_SYSCALL): New define.
	* sysdeps/unix/sysv/linux/m68k/kernel-features.h
	(__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Remove define.
	(__ASSUME_ACCEPT_SYSCALL): Define wheter kernel version supports.
	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
	(__ASSUME_ACCEPT_SYSCALL): Define.
	* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
	(__ASSUME_ACCEPT_SYSCALL): Undefine.
	* sysdeps/unix/sysv/linux/s390/kernel-features.h
	(__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Remove define.
	(__ASSUME_ACCEPT_SYSCALL): Undefine.
	* sysdeps/unix/sysv/linux/sh/kernel-features.h
	(__ASSUME_ACCEPT_SYSCALL): Undefine.
	* sysdeps/unix/sysv/linux/sparc/kernel-features.h
	(__ASSUME_ACCEPT_SYSCALL): Undefine for 32 bits.
2017-03-09 15:22:06 +01:00
..
aarch64 New pthread rwlock that is more scalable. 2017-01-10 11:50:17 +01:00
alpha alpha: Use saturating arithmetic in memchr 2017-02-01 14:39:04 -08:00
arm Update arm, mips, powerpc-nofpu libm-test-ulps. 2017-02-17 23:10:01 +00:00
generic Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug #21209) 2017-03-07 20:52:04 +05:30
gnu Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hppa Remove very old libm-test-ulps entries. 2017-01-20 23:58:49 +00:00
i386 Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
ia64 Allow direct use of math_ldbl.h in testsuite. 2017-02-25 10:40:48 -05:00
ieee754 Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k m68k: fix 64bit atomic ops 2017-02-01 01:32:31 +01:00
mach hurd: Provide truncate64 and ftruncate64. 2017-03-04 14:25:49 +01:00
microblaze Remove very old libm-test-ulps entries. 2017-01-20 23:58:49 +00:00
mips Update arm, mips, powerpc-nofpu libm-test-ulps. 2017-02-17 23:10:01 +00:00
nacl Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05: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 timezone: Remove TZNAME_MAX limit from sysconf [BZ #15576] 2017-03-07 17:45:38 +01:00
powerpc Miscellaneous low-risk changes preparing for _ISOMAC testsuite. 2017-03-01 20:32:50 -05:00
pthread Refer to <signal.h> instead of <pthread.h> in <bits/sigthread.h> 2017-02-28 10:34:15 +01:00
s390 S390: Regenerate ULPs 2017-03-08 08:34:58 +01:00
sh Remove very old libm-test-ulps entries. 2017-01-20 23:58:49 +00:00
sparc sparc: Remove optimized math routines which cause testsuite failures. 2017-02-03 17:55:25 -08:00
tile tile: Check for pointer add overflow in memchr 2017-01-16 15:44:48 -05:00
unix Consolidate Linux accept implementation 2017-03-09 15:22:06 +01:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wordsize-64 Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
x86 Use index_cpu_RTM and reg_RTM to clear the bit_cpu_RTM bit 2017-02-17 11:53:26 -08:00
x86_64 Document and fix --enable-bind-now [BZ #21015] 2017-03-02 14:44:28 +01:00