Bad practice w/errno causes compilation issue
Submitted by Stephen Dunn
Assigned to Nobody
Link to original bugzilla bug (#1079)
Version: 3.2
Operating system: Windows
Description
Best-practice guidelines for Windows Socket Servers (according to the MSDN) is to use the following:
#define errno WSAGetLastError()
For direct-mapping to Unix-style socket errors for compatibility in IPv4 servers. However, this conflicts with line 167 in Memory.h:
166: #ifdef EIGEN_HAS_ERRNO
167: errno = ENOMEM; // according to the standard
168: #endif
Which results in a compile error. It is not safe to assume errno is a primitive value type.