This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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:
...
MSG_EOR
Terminates a record (if supported by the protocol).
...

3. Reproducing the bug

3.1 This bug occurs at compile time.

3.2 Code snippet

#include <sys/socket.h>
#define BUF_SEND_NUM_BYTES 1024

int socketFdIpv4 = socket(AF_INET, SOCK_RAW, IPPROTO_IP);

(invocations of bind(), accept(), listen(), connect() - not needed to reproduce the compile time problem)

char bufSend[BUF_SEND_NUM_BYTES];

(initialization of bufSend contents omitted - not needed to reproduce the compile time problem)

ssize_t sendReturn = send(socketFdIpv4, bufSend, BUF_SEND_NUM_BYTES, MSG_EOR | MSG_OOB);

3.3 Compiler command

gcc -c -Werror -DPOSIX_FLAVOR=POSIX_OPEN_GROUP -DSCA_4_1_OE_AEP_FULL -o jtelSca4_1TestCaseOeAepProviderUofProfileFull.o jtelSca4_1TestCaseOeAepProviderUof.c

3.4 Compiler output

error: ‘MSG_EOR’ undeclared (first use in this function); did you mean ‘MSG_OOB’?
  ssize_t sendReturn = send(socketFdIpv4, bufSend, BUF_SEND_NUM_BYTES, MSG_EOR | MSG_OOB);
                                                                       ^~~~~~~
                                                                       MSG_OOB

V/r,
Ed Brabant
Joint Tactical Networking Center (JTNC)
JTNC Test & Evaluation Laboratory (JTEL)
Sr Staff Software Engineer, G2 Software Systems

Attachment: cygcheck.out
Description: cygcheck.out

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]