mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 07:20:11 +00:00
e5de3b5b72
The __ASSUME_SOCKETCALL macro in kernel-features.h is no longer used for anything. (It used to be used in defining other macros related to accept4 / recvmmsg / sendmmsg availability, but the code in that area was simplified once we could assume a kernel with those features, whether through a syscall or through socketcall, so allowing those functions to be handled much like other socket operations, without requring __ASSUME_SOCKETCALL.) This patch removes that unused macro. (Note: once we can assume a Linux 4.4 or later kernel, much of the support for using socketcall at all can be removed from glibc, although a few functions may need that support in glibc for longer.) Tested with build-many-glibcs.py. * sysdeps/unix/sysv/linux/kernel-features.h: Remove comment about __ASSUME_SOCKETCALL. * sysdeps/unix/sysv/linux/i386/kernel-features.h (__ASSUME_SOCKETCALL): Remove. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/powerpc/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/sparc/kernel-features.h (__ASSUME_SOCKETCALL): Likewise.
55 lines
2.0 KiB
C
55 lines
2.0 KiB
C
/* Set flags signalling availability of kernel features based on given
|
|
kernel version number.
|
|
Copyright (C) 2008-2018 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/>. */
|
|
|
|
/* Direct socketcalls available with kernel 4.3. */
|
|
#if __LINUX_KERNEL_VERSION >= 0x040300
|
|
# define __ASSUME_SOCKET_SYSCALL 1
|
|
# define __ASSUME_SOCKETPAIR_SYSCALL 1
|
|
# define __ASSUME_BIND_SYSCALL 1
|
|
# define __ASSUME_LISTEN_SYSCALL 1
|
|
# define __ASSUME_GETSOCKOPT_SYSCALL 1
|
|
# define __ASSUME_SETSOCKOPT_SYSCALL 1
|
|
# define __ASSUME_GETSOCKNAME_SYSCALL 1
|
|
# define __ASSUME_GETPEERNAME_SYSCALL 1
|
|
# define __ASSUME_SHUTDOWN_SYSCALL 1
|
|
#endif
|
|
|
|
#include_next <kernel-features.h>
|
|
|
|
#undef __ASSUME_ACCEPT_SYSCALL
|
|
|
|
#if __LINUX_KERNEL_VERSION < 0x040300
|
|
# undef __ASSUME_ACCEPT4_SYSCALL
|
|
# undef __ASSUME_RECVMMSG_SYSCALL
|
|
# undef __ASSUME_SENDMMSG_SYSCALL
|
|
# undef __ASSUME_SENDMSG_SYSCALL
|
|
# undef __ASSUME_RECVMSG_SYSCALL
|
|
# undef __ASSUME_CONNECT_SYSCALL
|
|
# undef __ASSUME_RECVFROM_SYSCALL
|
|
# undef __ASSUME_SENDTO_SYSCALL
|
|
#endif
|
|
|
|
/* No support for PI futexes or robust mutexes before 3.10 for m68k. */
|
|
#if __LINUX_KERNEL_VERSION < 0x030a00
|
|
# undef __ASSUME_SET_ROBUST_LIST
|
|
#endif
|
|
|
|
/* m68k only supports ipc syscall. */
|
|
#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
|