@@ -32,4 +32,6 @@
/* Alpha defines SysV ipc shmat syscall with a different name. */
#define __NR_shmat __NR_osf_shmat
+#define __ASSUME_RECV_SYSCALL 1
+
#endif /* _KERNEL_FEATURES_H */
@@ -10,8 +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
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
send - send Ci:ibni __libc_send __send send
sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
@@ -37,3 +37,5 @@
/* ARM only has a syscall for fadvise64{_64} and it is defined with a
non-standard name. */
#define __NR_fadvise64_64 __NR_arm_fadvise64_64
+
+#define __ASSUME_RECV_SYSCALL 1
@@ -27,8 +27,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
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
send - send Ci:ibni __libc_send __send send
sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
deleted file mode 100644
@@ -1,32 +0,0 @@
-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sysdep-cancel.h>
-#include <libc-symbols.h>
-
-ssize_t
-__libc_recv (int sockfd, void *buffer, size_t len, int flags)
-{
- return SYSCALL_CANCEL (recvfrom, sockfd, buffer, len, flags,
- NULL, NULL);
-}
-strong_alias (__libc_recv, __recv)
-libc_hidden_def (__recv)
-weak_alias (__libc_recv, recv)
@@ -8,7 +8,6 @@ listen - listen i:ii __listen listen
getsockname - getsockname i:ipp __getsockname getsockname
getpeername - getpeername i:ipp __getpeername getpeername
sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
shutdown - shutdown i:ii __shutdown shutdown
@@ -24,3 +24,5 @@
#endif
#include_next <kernel-features.h>
+
+#define __ASSUME_RECV_SYSCALL 1
@@ -6,8 +6,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
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
send - send Ci:ibni __libc_send __send send
sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
@@ -38,8 +38,6 @@
# define __ASSUME_GETPEERNAME_SYSCALL 1
# define __ASSUME_SENDTO_SYSCALL 1
# define __ASSUME_SENDTO_FOR_SEND_SYSCALL 1
-# define __ASSUME_RECVFROM_SYSCALL 1
-# define __ASSUME_RECVFROM_FOR_RECV_SYSCALL 1
# define __ASSUME_SHUTDOWN_SYSCALL 1
#endif
@@ -52,6 +50,7 @@
# undef __ASSUME_SENDMSG_SYSCALL
# undef __ASSUME_RECVMSG_SYSCALL
# undef __ASSUME_CONNECT_SYSCALL
+# undef __ASSUME_RECVFROM_SYSCALL
#endif
/* i686 only supports ipc syscall. */
@@ -28,4 +28,6 @@
# undef __ASSUME_ACCEPT4
#endif
+#define __ASSUME_RECV_SYSCALL 1
+
#endif /* _KERNEL_FEATURES_H */
@@ -10,8 +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
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
send - send Ci:ibni __libc_send __send send
sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
@@ -149,6 +149,7 @@
#define __ASSUME_RECVMSG_SYSCALL 1
#define __ASSUME_ACCEPT_SYSCALL 1
#define __ASSUME_CONNECT_SYSCALL 1
+#define __ASSUME_RECVFROM_SYSCALL 1
/* Support for SysV IPC through wired syscalls. All supported architectures
either support ipc syscall and/or all the ipc correspondent syscalls. */
@@ -32,8 +32,6 @@
# define __ASSUME_GETPEERNAME_SYSCALL 1
# define __ASSUME_SENDTO_SYSCALL 1
# define __ASSUME_SENDTO_FOR_SEND_SYSCALL 1
-# define __ASSUME_RECVFROM_SYSCALL 1
-# define __ASSUME_RECVFROM_FOR_RECV_SYSCALL 1
# define __ASSUME_SHUTDOWN_SYSCALL 1
#endif
@@ -49,6 +47,7 @@
# undef __ASSUME_SENDMSG_SYSCALL
# undef __ASSUME_RECVMSG_SYSCALL
# undef __ASSUME_CONNECT_SYSCALL
+# undef __ASSUME_RECVFROM_SYSCALL
#endif
/* No support for PI futexes or robust mutexes before 3.10 for m68k. */
@@ -28,9 +28,8 @@
#define __ASSUME_GETPEERNAME_SYSCALL 1
#define __ASSUME_SOCKETPAIR_SYSCALL 1
#define __ASSUME_SEND_SYSCALL 1
-#define __ASSUME_SENDTO_SYSCALL 1
#define __ASSUME_RECV_SYSCALL 1
-#define __ASSUME_RECVFROM_SYSCALL 1
+#define __ASSUME_SENDTO_SYSCALL 1
#define __ASSUME_SHUTDOWN_SYSCALL 1
#define __ASSUME_GETSOCKOPT_SYSCALL 1
#define __ASSUME_SETSOCKOPT_SYSCALL 1
@@ -34,6 +34,8 @@
# define __ASSUME_ALIGNED_REGISTER_PAIRS 1
/* mips32 only supports ipc syscall. */
# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
+/* mips32 support wire-up network syscalls. */
+# define __ASSUME_RECV_SYSCALL 1
#endif
/* Define that mips64-n32 is a ILP32 ABI to set the correct interface to
deleted file mode 100644
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/recv.c>
@@ -17,8 +17,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
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
send - send Ci:ibni __libc_send __send send
sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
@@ -31,7 +31,6 @@
#define __ASSUME_SEND_SYSCALL 1
#define __ASSUME_SENDTO_SYSCALL 1
#define __ASSUME_RECV_SYSCALL 1
-#define __ASSUME_RECVFROM_SYSCALL 1
#define __ASSUME_SHUTDOWN_SYSCALL 1
#define __ASSUME_GETSOCKOPT_SYSCALL 1
#define __ASSUME_SETSOCKOPT_SYSCALL 1
@@ -15,21 +15,16 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <signal.h>
#include <sys/socket.h>
-
#include <sysdep-cancel.h>
#include <socketcall.h>
-#include <kernel-features.h>
-#include <sys/syscall.h>
ssize_t
__libc_recv (int fd, void *buf, size_t len, int flags)
{
#ifdef __ASSUME_RECV_SYSCALL
return SYSCALL_CANCEL (recv, fd, buf, len, flags);
-#elif defined __ASSUME_RECVFROM_FOR_RECV_SYSCALL
+#elif defined __ASSUME_RECVFROM_SYSCALL
return SYSCALL_CANCEL (recvfrom, fd, buf, len, flags, NULL, NULL);
#else
return SOCKETCALL_CANCEL (recv, fd, buf, len, flags);
@@ -15,14 +15,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <signal.h>
#include <sys/socket.h>
-
#include <sysdep-cancel.h>
#include <socketcall.h>
-#include <kernel-features.h>
-#include <sys/syscall.h>
ssize_t
__libc_recvfrom (int fd, void *buf, size_t len, int flags,
@@ -32,8 +32,6 @@
# define __ASSUME_GETPEERNAME_SYSCALL 1
# define __ASSUME_SENDTO_SYSCALL 1
# define __ASSUME_SENDTO_FOR_SEND_SYSCALL 1
-# define __ASSUME_RECVFROM_SYSCALL 1
-# define __ASSUME_RECVFROM_FOR_RECV_SYSCALL 1
# define __ASSUME_SHUTDOWN_SYSCALL 1
#endif
@@ -48,6 +46,7 @@
# undef __ASSUME_SENDMSG_SYSCALL
# undef __ASSUME_RECVMSG_SYSCALL
# undef __ASSUME_CONNECT_SYSCALL
+# undef __ASSUME_RECVFROM_SYSCALL
#endif
/* s390 only supports ipc syscall. */
@@ -33,8 +33,6 @@
#define __ASSUME_SOCKETPAIR_SYSCALL 1
#define __ASSUME_SEND_SYSCALL 1
#define __ASSUME_SENDTO_SYSCALL 1
-#define __ASSUME_RECV_SYSCALL 1
-#define __ASSUME_RECVFROM_SYSCALL 1
#define __ASSUME_SHUTDOWN_SYSCALL 1
#define __ASSUME_GETSOCKOPT_SYSCALL 1
#define __ASSUME_SETSOCKOPT_SYSCALL 1
@@ -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. */
@@ -7,8 +7,6 @@ getpeername - getpeername 3 __getpeername getpeername
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
deleted file mode 100644
@@ -1,33 +0,0 @@
-/* Copyright (C) 2001-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <sys/socket.h>
-#include <sysdep-cancel.h>
-
-/* Read N bytes into BUF from socket FD.
- Returns the number read or -1 for errors. */
-
-ssize_t
-__libc_recv (int fd, void *buf, size_t n, int flags)
-{
- return SYSCALL_CANCEL (recvfrom, fd, buf, n, flags, NULL, NULL);
-}
-
-weak_alias (__libc_recv, __recv)
-libc_hidden_weak (__recv)
-weak_alias (__recv, recv)
@@ -15,7 +15,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
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown