Skip to content

Commit aa885c5

Browse files
stephanlachnitbluca
authored andcommitted
Do not use _MSC_VER if windows
This fixes several instances where _MSC_VER was used to determine whether to use afunix.h or not. For example, MinGW requires the use of afunix.h but does not define _MSC_VER. The correct behavior is checking ZMQ_HAVE_WINDOWS. Signed-off-by: Stephan Lachnit <[email protected]>
1 parent 2a75ef0 commit aa885c5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/ipc_address.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include <string>
99

10-
#if defined _MSC_VER
10+
#if defined ZMQ_HAVE_WINDOWS
1111
#include <afunix.h>
1212
#else
1313
#include <sys/socket.h>

src/ipc_connecter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "ipc_address.hpp"
1717
#include "session_base.hpp"
1818

19-
#ifdef _MSC_VER
19+
#if defined ZMQ_HAVE_WINDOWS
2020
#include <afunix.h>
2121
#else
2222
#include <unistd.h>

src/ipc_listener.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "socket_base.hpp"
1818
#include "address.hpp"
1919

20-
#ifdef _MSC_VER
20+
#ifdef ZMQ_HAVE_WINDOWS
2121
#ifdef ZMQ_IOTHREAD_POLLER_USE_SELECT
2222
#error On Windows, IPC does not work with POLLER=select, use POLLER=epoll instead, or disable IPC transport
2323
#endif

tests/testutil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#if defined _WIN32
99
#include "../src/windows.hpp"
10-
#if defined _MSC_VER
10+
#if defined ZMQ_HAVE_WINDOWS
1111
#if defined ZMQ_HAVE_IPC
1212
#include <direct.h>
1313
#include <afunix.h>

0 commit comments

Comments
 (0)