From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40297 invoked by alias); 24 Apr 2019 20:50:14 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 40271 invoked by uid 89); 24 Apr 2019 20:50:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=Red, principal, wondering X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Apr 2019 20:50:12 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8ABBD3082134 for ; Wed, 24 Apr 2019 20:50:11 +0000 (UTC) Received: from [10.3.116.149] (ovpn-116-149.phx2.redhat.com [10.3.116.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 428985C1B5 for ; Wed, 24 Apr 2019 20:50:11 +0000 (UTC) Subject: Re: bug: cygwin-devel v3.0.2-1 socket.h does not #define MSG_EOR per the POSIX standard To: cygwin@cygwin.com References: <0873126E9D101A4A983DE738F4346DBC9114A8F3@NAWESPSCXM03V.nadsuswe.nads.navy.mil> <20190424164358.GG30041@calimero.vinschen.de> <4e01e86d-83c9-5855-c4a5-29f5375dc2dc@cs.umass.edu> From: Eric Blake Openpgp: preference=signencrypt Message-ID: Date: Wed, 24 Apr 2019 20:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z3tV37u1Yk22I027Vb9UlZQEhZZUUQKtD" X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00172.txt.bz2 --z3tV37u1Yk22I027Vb9UlZQEhZZUUQKtD Content-Type: multipart/mixed; boundary="iTt5ustHOK9GbZztYVNS6YbuTUauR8OyY"; protected-headers="v1" From: Eric Blake To: cygwin@cygwin.com Message-ID: Subject: Re: bug: cygwin-devel v3.0.2-1 socket.h does not #define MSG_EOR per the POSIX standard References: <0873126E9D101A4A983DE738F4346DBC9114A8F3@NAWESPSCXM03V.nadsuswe.nads.navy.mil> <20190424164358.GG30041@calimero.vinschen.de> <4e01e86d-83c9-5855-c4a5-29f5375dc2dc@cs.umass.edu> In-Reply-To: --iTt5ustHOK9GbZztYVNS6YbuTUauR8OyY Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Content-length: 2058 On 4/24/19 3:36 PM, Hans-Bernhard Br=C3=B6ker wrote: > Am 24.04.2019 um 19:54 schrieb Eliot Moss: >> On 4/24/2019 12:43 PM, Corinna Vinschen wrote: >=20 >>> Since MSG_EOR isn't implemented in the underlying transport layer, >>> there's no way to implement it in userspace.=C2=A0 That's why it's not >>> defined in Cygwin's headers.=C2=A0 If you have an idea how to implement >>> this in plain userspace, feel free to provide patches. >> >> I don't have a direct interest in this issue, but I do have a wondering. >> If Cygwin fails to define an error code -- even if the error cannot >> actually happen under Cygwin -- isn't that a problem when trying to >> compile imported software?=C2=A0=20 >=20 Well, MSG_EOR is not an error, but we can certainly do better than not defining it at all. My suggestion for the least-cost implementation: - add a define for MSG_EOR to a non-zero value that is bitwise distinct from other required MSG_ values - return EOPNOTSUPP on attempts to use the flag in send()/sendmsg()/sendto() (POSIX permits that failure for protocols that don't support it - and none of Cygwin's protocols support it) - optionally, document that MSG_EOR will never be set in the results returned by recvmsg() (POSIX says it will only be set on protocols that support it - and none of Cygwin's protocols support it) This will at least let software compile that attempts to use it, and hopefully that software is robust to the fact that send() may reject the flag and that recvmsg() cannot reliably report use of that flag. >=20 > Either way, as Standardese goes, this is sufficiently unclear that it > IMHO calls for a defect report to the governing body of this standard. You're welcome to do so: http://austingroupbugs.net/main_page.php although I personally thought POSIX was clear enough that MSG_EOR is required to be defined, even if only so that it can trigger send() errors showing that it is unsupported. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org --iTt5ustHOK9GbZztYVNS6YbuTUauR8OyY-- --z3tV37u1Yk22I027Vb9UlZQEhZZUUQKtD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 488 -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlzAzAIACgkQp6FrSiUn Q2pb+Af/XlYmw/y559s5f/se51dxrbaa3TlgcOFflDhgA4h+1VUelwSZ2jNOZRPx F4ZjuQWRuT1fbDxT+3cNei7p7aVuyJdiIO6rz1O89Cu1EAz/b8C02tLtUdFzyr5l dMa5Nk0nNxQRo8s8osi/maO+vbaAwQ5eZXOe2u0kNMKQpB8DFeIBPCNBlmKMeZzB ygduQ4fIrEK34a3TTAgkm//KlZyrYBCC2VCXD4XJ091KxnRFs+/vVAJB5ukg6uQj hQUwm4bFkEzn3d0n+Yxzt78Opfh1Cg/jta46gZijtN7t1XR79UZBGk3pvsWhOXj6 SVi2S8qUgnQewuQw+62+inWbcW/C3Q== =iRyI -----END PGP SIGNATURE----- --z3tV37u1Yk22I027Vb9UlZQEhZZUUQKtD--