From 1f8161a801b2292a58f3036ea92aa7feeafc10f2 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 6 Mar 2017 12:53:14 +0100 Subject: Consolidate Linux recvfrom implementation This patch consolidates the recvfrom Linux syscall implementation on sysdeps/unix/sysv/linux/recvfrom.c. The changes are: 1. Define __ASSUME_RECVFROM_SYSCALL by default 2. Undef it for architectures that do not support __NR_recvfrom. 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 recvfrom 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/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/i386/kernel-features.h * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Define by default. (__ASSUME_RECVFROM_SYSCALL): Undef it if kernel does not support __NR_recvfrom. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Remove definition. * sysdeps/unix/sysv/linux/powerpc/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sparc/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/recvfrom.c: Simplify includes. --- sysdeps/unix/sysv/linux/sparc/kernel-features.h | 1 + sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux/sparc') diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index ba6e4c44e7..8e74478e27 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -41,6 +41,7 @@ #if !defined __arch64__ # undef __ASSUME_ACCEPT_SYSCALL # undef __ASSUME_CONNECT_SYSCALL +# undef __ASSUME_RECVFROM_SYSCALL #endif /* sparc only supports ipc syscall. */ diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list index 4c785fd019..f73b5195f4 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list @@ -8,7 +8,6 @@ getsockname - getsockname 3 __getsockname getsockname getsockopt - getsockopt 5 __getsockopt getsockopt listen - listen 2 __listen listen recv - recv C:4 __libc_recv __recv recv -recvfrom - recvfrom C:6 __libc_recvfrom __recvfrom recvfrom send - send C:4 __libc_send __send send sendto - sendto C:6 __libc_sendto __sendto sendto setsockopt - setsockopt 5 __setsockopt setsockopt -- cgit 1.4.1