Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • libeigenlibeigen
  • eigeneigen
  • Issues
  • #1079

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.

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
Time tracking