delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/01/11:10:44

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=bGdzwFUhDym/N9dFWlUF2A7AjJMTOA81Nxr07KGgyIYe7wMsmVsHG
tPOutBeya/ePfYR+ehtpDRa7zJttSEmMpdwhLmnOIlLngYW6VDTAhxE2xVONzmjh
iLVIC9LckrGLjZm3W9uQONP500/Ub9xd8SGTH9l0Htf8sNEf1athHk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=aHme9OjqvRGE5WW/JRpn+qCBRiA=; b=AjvFkEzt1HLU+i/mvOiv9WJalOT/
f2ACVCGxeB7EztJVTIHOIxB5bElupFxMj8mWVkpZAhKGc+/AKyQO1yCumbuOKe53
re5OkuFv059FfdrY3+6it8PBOpplEaDz6+/TToVyuGL7MwvJN1fYlcCa/4a1g1K8
MQDmFogUd4pDV5s=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-90.3 required=5.0 tests=AFFECTIONATE_BODY,AWL,BAYES_50,BODY_8BITS,GARBLED_BODY,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy==d0=b5=d1, ioctl, AF_INET, cygwin-x86?=
X-HELO: calimero.vinschen.de
Date: Fri, 1 Jul 2016 17:10:11 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: The function ioctl bug
Message-ID: <20160701151011.GB16421@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4441041467380288 AT web29j DOT yandex DOT ru>
MIME-Version: 1.0
In-Reply-To: <4441041467380288@web29j.yandex.ru>
User-Agent: Mutt/1.6.1 (2016-04-27)

--aVD9QWMuhilNxW9f
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Viacheslav,

On Jul  1 23:38, =D0=91=D0=B0=D0=B1=D0=B5=D0=BD=D0=BA=D0=BE =D0=92=D1=8F=D1=
=87=D0=B5=D1=81=D0=BB=D0=B0=D0=B2 wrote:
> Dear friends!
>=20
> The function ioctl return -1 (errno equal 95) if I use cygwin-x86_64 but =
return 0 if I use cygwin-x86.
>=20
> #include <stdio.h>
> #include <sys/socket.h>
> #include <sys/ioctl.h>
> #include <unistd.h>
> #include <errno.h>
>=20
> int main()
> {
>     int c;
>     int fd =3D socket(AF_INET, SOCK_STREAM, 0);
>     if (ioctl(fd, FIONREAD, &c) =3D=3D -1)
>         printf("errno:%u\n", errno);
>     close(fd);
>     return 0;
> }

My fault.  As result of a header change in newlib I also changed the
definition of FIONREAD and others in <asm/socket.h>, but failed to make
sure to call Winsock's ioctlsocket with the correctly specified Winsock
FIONREAD.  This only affects x86_64 as you noticed.

I applied a patch to fix this issue and uploaded new developer
snapshots to https://cygwin.com/snapshots/

(Note that recent snapshots don't work on XP and Server 2003 anymore)

Please give them a try.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--aVD9QWMuhilNxW9f
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXdofTAAoJEPU2Bp2uRE+g1iIQAJw1N/C6sh8yMsUnhDehmDK9
ksZjGvFUCu/JSYzXB5DYv0I/Iz/mWPEDeIljg9JBIPrOi3PImDJcXMK3wRRu9fcv
9RMZwr+w23SBExeiJ7tOcFAMxf79SNIW5O5d73YVaucrodXpLi5q9qNst+/oLyuL
dNvELQBhhM7lVrrWACojCWujAFpAKcMa5hjNH9BhP7gZP7JlibboLBGbx2TTPVQz
jQwiUKHEIaWo9t5GZvs82xixmJGeIsx4cnCR/UvM1lfyROZVKyN8rO3uVoe3sAIK
dAcGbcLwyM4lloVUjUYaj/MJSo6yGboUaG+4v+tYstTc4Wnq63wQUyH3Q5u3op7S
NWyQIr1VZhex/XgsfD2LXKodg6wGQeDKK7EH51Z/9VmEzE81CFR2xbB/YergxnPg
lKNzFXeA/AjHkuTKA6Ju3mUrPzLw1EJ2QBTI77h756UBR5q1NFXZU/EBpzeDRyIh
wO11YCztHJG9bOy+5JocaoTeHyQhrvlqvXgKw0pXEvgaR89i3LWLMWfwFVT+kOvX
kcIA/vvukhgYwqie3GeEbKbIDcy8oDcHFoKBfrSRXtnEkdgZUf5aCJHgkn3zjMZi
InqBJkRGeLXxc6veTfG/BQkqN5W8wcwWxfxbxtR7HKaZvTIHJcTyjae0B3G3xz5W
3SU/463ynMHAuc3dmi5s
=tspb
-----END PGP SIGNATURE-----

--aVD9QWMuhilNxW9f--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019