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

  1. Remove recv from auto-generation syscalls.list on the architecture
     that uses __NR_recv.
  2. Define __NR_recv for architectures that supports it.  It was done
     instead of defining in default kernel-features.h because current Linux
     practice for new ports is to implement only __NR_recvfrom [1] and it will
     require adding new kernel-features for ports that do not require it
     (aarch64 for instance).
  3. Remove __ASSUME_RECVFROM_FOR_RECV_SYSCALL and decide to use
     __NR_recvfrom for recv generation based on __ASSUME_RECVFROM_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/alpha/syscalls.list: Remove recv from
	auto-generation list.
	* sysdeps/unix/sysv/linux/arm/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/alpha/kernel-features.h
	(__ASSUME_RECV_SYSCALL): New define.
	* sysdeps/unix/sysv/linux/arm/kernel-features.h
	(__ASSUME_RECV_SYSCALL): Likewise.
	* sysdeps/unix/sysv/linux/hppa/kernel-features.h
	(__ASSUME_RECV_SYSCALL): Likewise.
	* sysdeps/unix/sysv/linux/ia64/kernel-features.h
	(__ASSUME_RECV_SYSCALL): Likewise.
	* sysdeps/unix/sysv/linux/mips/kernel-features.h
	(__ASSUME_RECV_SYSCALL): Likewise.
	* sysdeps/unix/sysv/linux/i386/kernel-features.h
	(__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
	* sysdeps/unix/sysv/linux/m68k/kernel-features.h
	(__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
	* sysdeps/unix/sysv/linux/s390/kernel-features.h
	(__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
	* sysdeps/unix/sysv/linux/generic/recv.c: Remove file.
	* sysdeps/unix/sysv/linux/mips/mips64/recv.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/recv.c: Likewise.
	* sysdeps/unix/sysv/linux/recv.c: Simplify includes.
	(__libc_recv): Use __ASSUME_RECVFROM_SYSCALL instead of
	__ASSUME_RECVFROM_FOR_RECV_SYSCALL to issue recvfrom syscall.

[1] include/asm-generic/unistd.h (__ARCH_WANT_SYSCALL_DEPRECATED)
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 recv 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