From df799d9eb335921f53aab8834219ef77fe280bc8 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 17 Nov 2016 18:47:00 -0200 Subject: 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) --- sysdeps/unix/sysv/linux/alpha/syscalls.list | 1 - 1 file changed, 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux/alpha/syscalls.list') diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list index 9cb44c1383..8a62b6e8b1 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -10,7 +10,6 @@ getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt listen - listen i:ii __listen listen -recv - recv Ci:ibni __libc_recv __recv recv send - send Ci:ibni __libc_send __send send sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto setsockopt - setsockopt i:iiibn __setsockopt setsockopt -- cgit 1.4.1