aboutsummaryrefslogtreecommitdiff
path: root/socket/sys/socket.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-07-25 04:51:56 +0000
committerUlrich Drepper <drepper@redhat.com>2008-07-25 04:51:56 +0000
commitbdcebfc4c7cc4f08efaf84af19465893f69fd5ed (patch)
tree2335c641a0fe139b353e3ae89c8b13385c34ac2e /socket/sys/socket.h
parent0e077a7eea286a8efd63460d0ea5d99e44a86b71 (diff)
downloadglibc-bdcebfc4c7cc4f08efaf84af19465893f69fd5ed.tar
glibc-bdcebfc4c7cc4f08efaf84af19465893f69fd5ed.tar.gz
glibc-bdcebfc4c7cc4f08efaf84af19465893f69fd5ed.tar.bz2
glibc-bdcebfc4c7cc4f08efaf84af19465893f69fd5ed.zip
* Versions.def (glibc): Add GLIBC_2.9.
* io/Makefile (routines): Add dup3 and pipe2. * io/Versions [glibc] (GLIBC_2.9): Add dup3 and pipe2. * io/dup3.c: New file. * io/pipe2.c: New file. * posix/unistd.h: Declare dup3 and pipe2. * socket/Makefile (routines): Add paccept. * socket/Versions [glibc] (GLIBC_2.9): Add paccept. * socket/paccept.c: New file. * socket/sys/socket.h: Declare paccept. * sysdeps/unix/syscalls.list: Add entry for dup3. * sysdeps/unix/sysv/linux/Versions [glibc] (GLIBC_2.9): Add epoll_create2 and inotify_init1. * sysdeps/unix/sysv/linux/eventfd.c: Use eventfd1 syscall if possible. * sysdeps/unix/sysv/linux/paccept.c: New file. * sysdeps/unix/sysv/linux/signalfd.c: Use signalfd4 syscall if possible. * sysdeps/unix/sysv/linux/socketcall.h: Add SOCKOP_paccept. * sysdeps/unix/sysv/linux/syscalls.list: Add epoll_create2, inotify_init1, and pipe2 entries. * sysdeps/unix/sysv/linux/alpha/sys/epoll.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/eventfd.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/inotify.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/signalfd.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/timerfd.h: New file. * sysdeps/unix/sysv/linux/bits/socket.h: Define SOCK_CLOEXEC and SOCK_NONBLOCK. * sysdeps/unix/sysv/linux/i386/paccept.S: New file. * sysdeps/unix/sysv/linux/sparc/sys/epoll.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/inotify.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/signalfd.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/timerfd.h: New file. * sysdeps/unix/sysv/linux/sparc/bits/socket.h: New file. * sysdeps/unix/sysv/linux/sys/epoll.h: Define EPOLL_CLOEXEC and EPOLL_NONBLOCK. Declare epoll_create2. * sysdeps/unix/sysv/linux/sys/eventfd.h: Define EFD_CLOEXEC and EFD_NONBLOCK. * sysdeps/unix/sysv/linux/sys/inotify.h: Define IN_CLOEXEC and IN_NONBLOCK. Declare inotify_init1. * sysdeps/unix/sysv/linux/sys/signalfd.h: Define SFD_CLOEXEC and SFD_NONBLOCK. * sysdeps/unix/sysv/linux/sys/timerfd.h: Define TFD_CLOEXEC and TFD_NONBLOCK.
Diffstat (limited to 'socket/sys/socket.h')
-rw-r--r--socket/sys/socket.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/socket/sys/socket.h b/socket/sys/socket.h
index 6d9eab7f94..ea4123d287 100644
--- a/socket/sys/socket.h
+++ b/socket/sys/socket.h
@@ -1,5 +1,5 @@
/* Declarations of socket constants, types, and functions.
- Copyright (C) 1991,92,1994-2001,2003,2005,2007
+ Copyright (C) 1991,92,1994-2001,2003,2005,2007,2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -28,6 +28,10 @@ __BEGIN_DECLS
#include <sys/uio.h>
#define __need_size_t
#include <stddef.h>
+#ifdef __USE_GNU
+/* Get the __sigset_t definition. */
+# include <bits/sigset.h>
+#endif
/* This operating system-specific header file defines the SOCK_*, PF_*,
@@ -210,6 +214,18 @@ extern int listen (int __fd, int __n) __THROW;
extern int accept (int __fd, __SOCKADDR_ARG __addr,
socklen_t *__restrict __addr_len);
+#ifdef __USE_GNU
+/* Variant of the accept function which takes additional parameters. The
+ MASK parameter allows to change the thread signal mask for the duration
+ of the call. The FLAGS parameter allows to pass additional flags.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int paccept (int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len,
+ __const __sigset_t *__restrict __ss, int __flags);
+#endif
+
/* Shut down all or part of the connection open on socket FD.
HOW determines what to shut down:
SHUT_RD = No more receptions;