From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31705 invoked by alias); 17 Sep 2005 14:07:57 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 31689 invoked by uid 22791); 17 Sep 2005 14:07:57 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 17 Sep 2005 14:07:57 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id EED4C1C26A for ; Sat, 17 Sep 2005 16:07:50 +0200 (CEST) Received: from aj by arthur.inka.de with local (Exim 4.51) id 1EGdLz-0003ls-Bs for libc-hacker@sources.redhat.com; Sat, 17 Sep 2005 16:07:43 +0200 From: Andreas Jaeger To: Glibc hackers Subject: Fix sockatmark implementation Date: Sat, 17 Sep 2005 14:07:00 -0000 Message-ID: User-Agent: Gnus/5.110004 (No Gnus v0.4) XEmacs/21.5-b21 (linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2005-09/txt/msg00023.txt.bz2 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 1955 Sockatmark was not implemented correctly at all, the ioctl needs an extra argument. Ok to commit? Andreas 2005-09-17 Andreas Jaeger [BZ #1010] * sysdeps/unix/sysv/linux/sockatmark.c: New file. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 +020= 0 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 +#include + +/* Determine wheter socket is at a out-of-band mark. */ +int +sockatmark (int fd) +{ + int arg, retval; + + retval =3D INLINE_SYSCALL (ioctl, 3, fd, SIOCATMARK, &arg); + if (retval =3D=3D -1) + return -1; +=20=20 + return arg; +} --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 --=-=-= Content-Type: application/pgp-signature Content-length: 188 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDLCMvOJpWPMJyoSYRAqdWAJ9/0gX6ZRWYZ0pz9bRbsi4AToo02wCZAdNE vscQo9T1BC/e/WyAg3AxWEw= =zWvM -----END PGP SIGNATURE----- --=-=-=--