From: Andreas Jaeger <aj@suse.de>
To: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Fix sockatmark implementation
Date: Sat, 17 Sep 2005 14:07:00 -0000 [thread overview]
Message-ID: <m3acibkcsw.fsf@gromit.moeb> (raw)
[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]
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 #2: Type: application/pgp-signature, Size: 188 bytes --]
next reply other threads:[~2005-09-17 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-17 14:07 Andreas Jaeger [this message]
2005-09-17 23:38 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3acibkcsw.fsf@gromit.moeb \
--to=aj@suse.de \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).