Skaarj NaPali | 12 Aug 2012 11:33
Picon

Re: EINTR, EAGAIN, EINPROGRESS, EDOULDBLOCK Compile warning

The patch which was introduced in 2012.08.08 of live555 "solves" the
compile time problem, but leads to wrong error numbers in the binary.
The reason for this is because VS2010 does define those error
constants in "errno.h" but the Windows socket API does not use them.
The Windows socket API still returns WSAE error codes only. But the
WSAE error codes do not match the error codes which are defined
"errno.h".

There other ways to solve that problem.

You may want to compile the library code with "-DNO_SSTREAM" which is
the originator of the problem, because including of "<sstream>" in
"groupsock" library also pulls in the problematic "errno.h"
indirectly.

You can undefine any already defined constants from "errno.h" like shown below.

<<<NetCommon.h>>>
...
...
...
#define closeSocket closesocket
#ifdef EWOULDBLOCK
#undef EWOULDBLOCK
#endif
#ifdef EINPROGRESS
#undef EINPROGRESS
#endif
#ifdef EAGAIN
#undef EAGAIN
(Continue reading)

Ross Finlayson | 12 Aug 2012 15:31
Favicon

Re: EINTR, EAGAIN, EINPROGRESS, EDOULDBLOCK Compile warning

You can undefine any already defined constants from "errno.h" like shown below.

<<<NetCommon.h>>>
...
...
...
#define closeSocket closesocket
#ifdef EWOULDBLOCK
#undef EWOULDBLOCK
#endif
#ifdef EINPROGRESS
#undef EINPROGRESS
#endif
#ifdef EAGAIN
#undef EAGAIN
#endif
#ifdef EINTR
#undef EINTR
#endif
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EINPROGRESS WSAEWOULDBLOCK
#define EAGAIN WSAEWOULDBLOCK
#define EINTR WSAEINTR

OK, I've just installed a new version of the code that makes this change,

(Quite frankly, Windows is becoming more trouble than it's worth...)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

_______________________________________________
live-devel mailing list
live-devel@...
http://lists.live555.com/mailman/listinfo/live-devel
Ross Finlayson | 12 Aug 2012 15:31
Favicon

Re: EINTR, EAGAIN, EINPROGRESS, EDOULDBLOCK Compile warning

You can undefine any already defined constants from "errno.h" like shown below.

<<<NetCommon.h>>>
...
...
...
#define closeSocket closesocket
#ifdef EWOULDBLOCK
#undef EWOULDBLOCK
#endif
#ifdef EINPROGRESS
#undef EINPROGRESS
#endif
#ifdef EAGAIN
#undef EAGAIN
#endif
#ifdef EINTR
#undef EINTR
#endif
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EINPROGRESS WSAEWOULDBLOCK
#define EAGAIN WSAEWOULDBLOCK
#define EINTR WSAEINTR

OK, I've just installed a new version of the code that makes this change,

(Quite frankly, Windows is becoming more trouble than it's worth...)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Gmane