1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* socket/sys/socket.h: Declare accept4.

* socket/accept4.c: New file.
	* sysdeps/unix/sysv/linux/accept4.c: New file.
	* sysdeps/unix/sysv/linux/i386/accept4.S: New file.
	* socket/Makefile (routines): Add accept4.
	* socket/Versions: Export accept4 with version GLIBC_2.10.
	* socket/paccept.c: Removed.
	* sysdeps/unix/sysv/linux/paccept.c: Removed.
	* sysdeps/unix/sysv/linux/i386/paccept.S: Removed.
	* Versions.def: Define GLIBC_2.10 for libc.
	* sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_ACCEPT4.

	* nscd/connections.c: Use accept4.

	* sysdeps/unix/sysv/linux/i386/socket.S: Fix comment.
This commit is contained in:
Ulrich Drepper
2008-12-03 04:23:18 +00:00
parent 9744268c10
commit f93fc0b75a
11 changed files with 198 additions and 97 deletions

View File

@ -509,5 +509,11 @@
# define __ASSUME_SOCK_CLOEXEC 1
# define __ASSUME_IN_NONBLOCK 1
# define __ASSUME_PIPE2 1
# define __ASSUME_PACCEPT 1
#endif
/* Support for the accept4 syscall was added in 2.6.28. */
#if __LINUX_KERNEL_VERSION >= 0x02061b \
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
|| defined __ia64__ || defined __sparc__ || __s390__)
# define __ASSUME_ACCEPT4 1
#endif