This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Sockatmark was not implemented correctly at all, the ioctl needs an
extra argument. Ok to commit?
Andreas
2005-09-17 Andreas Jaeger <aj@suse.de>
[BZ #1010]
* sysdeps/unix/sysv/linux/sockatmark.c: New file.
============================================================
Index: sysdeps/unix/sysv/linux/sockatmark.c
--- sysdeps/unix/sysv/linux/sockatmark.c created
+++ sysdeps/unix/sysv/linux/sockatmark.c 2005-09-17 16:06:06.000000000 +0200 1.1
@@ -0,0 +1,33 @@
+/* Copyright (C) 2005 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, 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 (int fd)
+{
+ int arg, retval;
+
+ retval = INLINE_SYSCALL (ioctl, 3, fd, SIOCATMARK, &arg);
+ if (retval == -1)
+ return -1;
+
+ return arg;
+}
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |