From b56b68f69ee6d6b07662babb514593ee9bfa3a9a Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 10 Mar 2025 17:26:01 +0700 Subject: [PATCH] win32: Use `_WIN32` and not `WIN32` for preprocessor In some build configurations, the use of `WIN32` fails and these were the only locations in the code using that formulation. Use `_WIN32` instead. --- gecode/search/cpprofiler/connector.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gecode/search/cpprofiler/connector.hpp b/gecode/search/cpprofiler/connector.hpp index d92e72a1c6..d5092b112b 100755 --- a/gecode/search/cpprofiler/connector.hpp +++ b/gecode/search/cpprofiler/connector.hpp @@ -42,7 +42,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #include @@ -270,7 +270,7 @@ namespace Gecode { namespace CPProfiler { struct addrinfo hints, *servinfo, *p; int rv; -#ifdef WIN32 +#ifdef _WIN32 // Initialise Winsock. WSADATA wsaData; int startupResult = WSAStartup(MAKEWORD(2, 2), &wsaData); @@ -297,7 +297,7 @@ namespace Gecode { namespace CPProfiler { } if (::connect(sockfd, p->ai_addr, p->ai_addrlen) == -1) { -#ifdef WIN32 +#ifdef _WIN32 closesocket(sockfd); #else close(sockfd); @@ -378,7 +378,7 @@ namespace Gecode { namespace CPProfiler { inline void Connector::disconnect() { -#ifdef WIN32 +#ifdef _WIN32 closesocket(sockfd); #else close(sockfd);