Web lists-archives.com

Re: bug: cygwin-devel v3.0.2-1 socket.h does not #define MSG_EOR per the POSIX standard

On 4/24/2019 12:43 PM, Corinna Vinschen wrote:
On Apr 24 15:47, Brabant, Edward H CTR (USA) wrote:
1. In cygwin-devel v3.0.2-1, <cygwin/socket.h> does not #define
MSG_EOR.  In bash, with CWD=/usr/include, the command "find . -name
'*.h' -exec grep -Hn MSG_EOR {} \;" does not find any matches.

2. The Open Group man page for <sys/socket.h> contains the following
excerpt regarding #define MSG_EOR:

      The <sys/socket.h> header shall define the following symbolic
      constants with distinct values for use as the valid values for
      the msg_flags field in the msghdr structure, or the flags
      parameter in recv(), recvfrom(), recvmsg(), send(), sendmsg(), or
      sendto() calls:
Terminates a record (if supported by the protocol).

MSG_EOR is not supported by underlying WinSock.  There's a similar
MSG_PARTIAL, but it's defined differently.  It's also unsupported by
all of the predefined protocols, including UDP.

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?  I wouldn't mind if the code were defined,
and a note included in comments that the error will not actually
occur under Cygwin ...

Is this a reasonable argument in support of including a define of the
error code?

Regards -- Eliot Mos

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