delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/04/24/16:50:24

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; q=dns; s=default; b=YF/P
sJAt7vQXJJImymU/dfyRdFqyNJ4A2kzfLDRAIfujEcqL9KeEqhNVkq0eH042w1Rw
nSszfMaeBGfJRpwkoNgAX2fAdKubAC8fgjKUFMVSLiXDPizVZyZQNDxOihii1K61
1nOeGSRoq7KBfPm+mpcUOqnSs36qf6y+2kFM+ho=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; s=default; bh=uH0ikUCpVj
CrUCJEZkExXIL2Iik=; b=g/CkuvmYwTGGs4mAHTXeLJCYBBkcSTrG5fY5IjpXpI
QTGc8+ue6uaU+PPe+/+hC1/JBWk8RwV8jbBrzUYf2BNkJARBcJa1rAxGWj9qCPQO
C/Ng8/ffJuKIMZICIhVFTC6VCgL/iMVwPWB8zQZSMf9ECNL0L+iMJJMvfVNCgch5
0=
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-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
Subject: Re: bug: cygwin-devel v3.0.2-1 socket.h does not #define MSG_EOR per the POSIX standard
To: cygwin AT cygwin DOT com
References: <0873126E9D101A4A983DE738F4346DBC9114A8F3 AT NAWESPSCXM03V DOT nadsuswe DOT nads DOT navy DOT mil> <20190424164358 DOT GG30041 AT calimero DOT vinschen DOT de> <4e01e86d-83c9-5855-c4a5-29f5375dc2dc AT cs DOT umass DOT edu> <a1cb4f3e-ae07-26c2-aa7f-695f2a178961 AT t-online DOT de>
From: Eric Blake <eblake AT redhat DOT com>
Openpgp: preference=signencrypt
Message-ID: <f73771ca-780c-cde3-2edc-08bb60b1c261@redhat.com>
Date: Wed, 24 Apr 2019 15:50:10 -0500
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: <a1cb4f3e-ae07-26c2-aa7f-695f2a178961@t-online.de>
X-IsSubscribed: yes

--z3tV37u1Yk22I027Vb9UlZQEhZZUUQKtD
Content-Type: multipart/mixed; boundary="iTt5ustHOK9GbZztYVNS6YbuTUauR8OyY";
 protected-headers="v1"
From: Eric Blake <eblake AT redhat DOT com>
To: cygwin AT cygwin DOT com
Message-ID: <f73771ca-780c-cde3-2edc-08bb60b1c261 AT redhat DOT com>
Subject: Re: bug: cygwin-devel v3.0.2-1 socket.h does not #define MSG_EOR per
 the POSIX standard
References: <0873126E9D101A4A983DE738F4346DBC9114A8F3 AT NAWESPSCXM03V DOT nadsuswe DOT nads DOT navy DOT mil>
 <20190424164358 DOT GG30041 AT calimero DOT vinschen DOT de>
 <4e01e86d-83c9-5855-c4a5-29f5375dc2dc AT cs DOT umass DOT edu>
 <a1cb4f3e-ae07-26c2-aa7f-695f2a178961 AT t-online DOT de>
In-Reply-To: <a1cb4f3e-ae07-26c2-aa7f-695f2a178961 AT t-online DOT de>


--iTt5ustHOK9GbZztYVNS6YbuTUauR8OyY
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

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"

-----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--

- Raw text -


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