public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: bug: cygwin-devel v3.0.2-1 socket.h does not #define MSG_EOR per the POSIX standard
Date: Thu, 25 Apr 2019 15:28:00 -0000	[thread overview]
Message-ID: <3a646fc6-82cb-1980-cc85-75cd4db6f3a0@SystematicSw.ab.ca> (raw)
In-Reply-To: <f73771ca-780c-cde3-2edc-08bb60b1c261@redhat.com>

On 2019-04-24 14:50, Eric Blake wrote:
> On 4/24/19 3:36 PM, Hans-Bernhard Bröker wrote:
>> Am 24.04.2019 um 19:54 schrieb Eliot Moss:
>>> On 4/24/2019 12:43 PM, Corinna Vinschen wrote:
>>
>>>> Since MSG_EOR isn't implemented in the underlying transport layer,
>>>> there's no way to implement it in userspace.  That's why it's not
>>>> defined in Cygwin's headers.  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?  
>>
> 
> 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.
> 
>>
>> 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.

Would it be allowed and valid to #define MSG_EOR 0 to simplify lack of support?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2019-04-25 15:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 15:48 Brabant, Edward H CTR (USA)
2019-04-24 16:44 ` Corinna Vinschen
2019-04-24 17:54   ` Eliot Moss
2019-04-24 20:36     ` Hans-Bernhard Bröker
2019-04-24 20:50       ` Eric Blake
2019-04-25 15:28         ` Brian Inglis [this message]
2019-04-25 15:48           ` Eric Blake
2019-04-25 18:36             ` Hans-Bernhard Bröker
2019-04-25 17:08         ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a646fc6-82cb-1980-cc85-75cd4db6f3a0@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).