Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 1 Jun 2001 09:27:15 +0000 (09:27 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 1 Jun 2001 09:27:15 +0000 (09:27 +0000)
2001-06-01  Ulrich Drepper  <drepper@redhat.com>

* socket/Makefile (routines): Add sockatmark.
* socket/Versions [GLIBC_2.2.4]: Add sockatmark.
* socket/sys/socket.h: Add prototype for sockatmark.
* sysdeps/generic/sockatmark.c: New file.
* sysdeps/unix/sockatmark.c: New file.

ChangeLog
socket/Makefile
socket/Versions
socket/sys/socket.h
sysdeps/unix/sockatmark.c [new file with mode: 0644]

index ad8b77f..2cd7343 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-06-01  Ulrich Drepper  <drepper@redhat.com>
+
+       * socket/Makefile (routines): Add sockatmark.
+       * socket/Versions [GLIBC_2.2.4]: Add sockatmark.
+       * socket/sys/socket.h: Add prototype for sockatmark.
+       * sysdeps/generic/sockatmark.c: New file.
+       * sysdeps/unix/sockatmark.c: New file.
+
 2001-06-01  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/unix/sysv/linux/speed.c (cfsetispeed): Max speed is
index fb97705..c967df2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1991,95,96,97,98,99,2000 Free Software Foundation, Inc.
+# Copyright (C) 1991,95,96,97,98,99,2000,2001 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
@@ -26,7 +26,8 @@ headers       := sys/socket.h sys/un.h bits/sockaddr.h bits/socket.h \
 
 routines := accept bind connect getpeername getsockname getsockopt     \
            listen recv recvfrom recvmsg send sendmsg sendto            \
-           setsockopt shutdown socket socketpair isfdtype opensock
+           setsockopt shutdown socket socketpair isfdtype opensock     \
+           sockatmark
 
 distribute := ifreq.h
 
index 6b114c8..e9ac609 100644 (file)
@@ -32,4 +32,8 @@ libc {
     # s*
     send; sendmsg; sendto; setsockopt; shutdown; socket; socketpair;
   }
+  GLIBC_2.2.4 {
+    # Addition from P1003.1-200x
+    sockatmark;
+  }
 }
index 7ccb7dd..3ff4fc5 100644 (file)
@@ -199,6 +199,12 @@ extern int accept (int __fd, __SOCKADDR_ARG __addr,
 extern int shutdown (int __fd, int __how) __THROW;
 
 
+#ifdef __USE_XOPEN2K
+/* Determine wheter socket is at a out-of-band mark.  */
+extern int sockatmark (int __fd) __THROW;
+#endif
+
+
 #ifdef __USE_MISC
 /* FDTYPE is S_IFSOCK or another S_IF* macro defined in <sys/stat.h>;
    returns 1 if FD is open on an object of the indicated type, 0 if not,
diff --git a/sysdeps/unix/sockatmark.c b/sysdeps/unix/sockatmark.c
new file mode 100644 (file)
index 0000000..d52d8ff
--- /dev/null
@@ -0,0 +1,28 @@
+/* Copyright (C) 2001 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 Library General Public License as
+   published by the Free Software Foundation; either version 2 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+
+/* Determine wheter socket is at a out-of-band mark.  */
+int
+sockatmark (fd)
+     int fd;
+{
+  return ioctl (fd, SIOCATMARK);
+}