From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122649 invoked by alias); 25 Apr 2019 17:08:52 -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 122642 invoked by uid 89); 25 Apr 2019 17:08:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-103.5 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*RU:sk:mrelaye, HX-Provags-ID:V03, H*r:sk:mrelaye, H*r:Nemesis X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.133) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Apr 2019 17:08:51 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MHo6Y-1hYXpu058o-00EtEL for ; Thu, 25 Apr 2019 19:08:48 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 25096A806D4; Thu, 25 Apr 2019 19:08:47 +0200 (CEST) Date: Thu, 25 Apr 2019 17:08:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: bug: cygwin-devel v3.0.2-1 socket.h does not #define MSG_EOR per the POSIX standard Message-ID: <20190425170847.GH30041@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <0873126E9D101A4A983DE738F4346DBC9114A8F3@NAWESPSCXM03V.nadsuswe.nads.navy.mil> <20190424164358.GG30041@calimero.vinschen.de> <4e01e86d-83c9-5855-c4a5-29f5375dc2dc@cs.umass.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UTZ8bGhNySVQ9LYl" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-04/txt/msg00177.txt.bz2 --UTZ8bGhNySVQ9LYl Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1994 On Apr 24 15:50, Eric Blake wrote: > 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 impleme= nt > >>> this in plain userspace, feel free to provide patches. > >> > >> I don't have a direct interest in this issue, but I do have a wonderin= g. > >> 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 >=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: >=20 > - 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) >=20 > 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. Interesting. I really thought it's better that a programm does not compile, rather than it compiles and misbehaves from the POV of the developer. I added the MSG_EOR definition and send(2) and friends return EOPNOTSUPP now. I uploaded a snapshot to https://cygwin.com/snapshots/ with this change. Corinna --=20 Corinna Vinschen Cygwin Maintainer --UTZ8bGhNySVQ9LYl Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlzB6Z4ACgkQ9TYGna5E T6D1dg/+My1GR9uq7sfN9UzQcsxx+o22rmQdPd9gyoOW0BCQUoeQGyBTJytgmMK6 dAzdi26aHwZt6xMKrur2EdH19p68H3QLXBlo/0AYMFKH2ivp60CJqGESK7vm35Cr p7by7YI+M2hCoFXMOhuMGmautOhu7cFcFG6Tc2k+hgZDd9ee8Y7lraJomyPehlTR 5j3uMvF82pydBZI92Cx61KWw4hvkcEoWVPhNoPYkJTxjbVzYpMEKw6fFGY35u7Zf QklHsD28E/UvEURVkNFb7dKcj0w6g/4pXL7mvLfGTCwWXaTBz++5f312CgkyQ632 asTWeL8V8RatYaBwWDU0204PuXSrRBBu40OFGnm16oVgFMQ9HKhr3o3oY0sMcd29 Y5nRp+h0r1XcpvZkvKsR5a+4uqgjFyqZ8o6DIV+nHxI8nEIt87jwDSDHdlp2PiSi WE45L0DY6rug9XK6ZZJwoT2sfPR2mZmOiXcW1wF90V3EJpzxmbHoX2c4PcK7PS7e 9kmI+06A6triRQ9Ra0Cl/f+GNu1S2BwAWiaGaLL8xRVhs7V+pLBI+te849scZAVK 407k4syXhrDS/d74A+4CCGyNMpI5gRRy7ZIWimC7NBzaedX2tEGvjrmQ/13unDxx P21NJIa4QnXt/ag+WmBNTh+Q4FUe1gUQnJy7LMAw5caBd+Av32w= =05Dx -----END PGP SIGNATURE----- --UTZ8bGhNySVQ9LYl--