X-Recipient: archive-cygwin@delorie.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=QP4ylluJNj1ftKVlH7dfbYJunnyWZuSXsPw1mL3kHUw7fQXlzBt5c
	PN7kAyQT4o8r99rT3sOrxXIxHl2Or1wn6RnMmRzupRY0JHkuTGGBTdJuXs9Au2Gx
	XKucqUjVn/EJmJGccxjn9UKotiwjrw1J4WlptkwAVKDmbnxFkfp+ag=
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=8n2AF7VNu2mWE5s0TzPGhYpBID8=; b=h2GPUhIq3iYwT/4oveTbOAgKmMpg
	HEbTmYWiAEqGXn3TSPwapjWdKHMNjrzYxDrk7ij7EdYc3tuNI0N12+GS3zgU6OhM
	em6BUI+NdU1/LZ2OSApO4FS3fU0165IfJ8EUzqHsXxzkzCeXfibk0sMADVyEraMX
	HpKBjR8vFCyOXEo=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Mon, 5 May 2014 17:28:21 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Bug at getsockopt when TCP_NODELAY is used as parameter
Message-ID: <20140505152821.GA7694@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <CA+wAnvyrB2ecwdJsvzqmMNjPFTnW6rT0rYdNcXRbK4z5WJqwyg@mail.gmail.com> <535CC856.7050808@gmail.com> <20140505123459.GJ30918@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J"
Content-Disposition: inline
In-Reply-To: <20140505123459.GJ30918@calimero.vinschen.de>
User-Agent: Mutt/1.5.21 (2010-09-15)

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

On May  5 14:34, Corinna Vinschen wrote:
> Only, starting with Windows Vista, getsockopt suddenly returned with
> optlen set to 1, which is sizeof(BOOLEAN), the boolean type used by the
> underlying kernel.  And this has never been fixed again.
>=20
> Cygwin already handles this problem by converting the value to a
> sizeof(int) value and changing optlen accordingly, but only for the
> socket options SOL_SOCKET/SO_KEEPALIVE and SOL_SOCKET/SO_DONTROUTE.
>=20
> I will fix that at one point, but I have to dig into that a bit more to
> see which socket options have to be special-cased, or if this
> special-casing can be radically simplified somehow.  Special-casing
> dozens of socket options just to tweak the return type isn't exactly
> fun.

Funny enough, of all BSD/Linux-compatible options, only three seem to be
affected at all, SOL_SOCKET/SO_KEEPALIVE, SOL_SOCKET/SO_DONTROUTE, and
IPPROTO_TCP/TCP_NODELAY.  I applied a patch which is supposed to fix
this problem, and I just generated a new developer snapshot which is,
as usual, available on http://cygwin.com/snapshots/ Please give it a try.


Thanks,
Corinna

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

--VbJkn9YxBvnuCH5J
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTZ64VAAoJEPU2Bp2uRE+g+hkP/3VQHl3ttFQUpMaGJIEJ7Pwb
J1Ty84SK7MWphPUAHEG8ajjjbs9e1MvvLTuM7V0cjU8wHAD6WqsWQxapMRkvr5rF
/scvPQ79Bx3AyTMZGERJF0n8VnO9A6RMjbCAYsgwpnztliSganIVaMCR35e/B8e9
M10f65YtWntDvAJdQ8aOIcdbLrHBjGywu+eWLjBNiKgiFzE4hMtHolzz1gg/D/C2
nN7qYcKWLUAwu3uyVcxuJyizBWnD8n7J2Bb+nqKV1/V7LkKLVsaRihj0pEcO8lTV
jxJmnjKFy0yAvaaAD2NrIQ7jRzI0CYfEByGVbk3PP2lifik3QSwlHf906gGgbTpP
MFLZGhvvoUkHYzVkUCcpit6X7AUE8gbNOEgNPA0ERu02ogPfYei6FszxlIEpgATx
oKh1JRYrA+2KspB70aASHQfrbLkcnwAtRLjZunoE2C8s32e2Tn7FLO+HcfIVfl/o
hCp2NLf00P56BtdVdCq2EALdZjBDJOuOoYAXxYraRT1ddnTHGJbn5R+LpKH2daZK
hGFD3e/XDGwO7d4fwI1/4vCD+aNsGaBSzK4YOW0ImknhgVMTl9hwIE99JegSVcv6
UOqoIK+yd2pd6zxdhMVPjABTVSMhaaXPVaFlhdlLO+eXhemJJ9ygvBJv0qH45rj8
n7+mXpnqXzVb4PAZSVfJ
=9UvE
-----END PGP SIGNATURE-----

--VbJkn9YxBvnuCH5J--
