Skip to content

win32: Use _WIN32 and not WIN32 for preprocessor #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: release/6.3.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gecode/search/cpprofiler/connector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <vector>
#include <cstring>

#ifdef WIN32
#ifdef _WIN32

#include <winsock2.h>
#include <ws2tcpip.h>
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -378,7 +378,7 @@ namespace Gecode { namespace CPProfiler {

inline void
Connector::disconnect() {
#ifdef WIN32
#ifdef _WIN32
closesocket(sockfd);
#else
close(sockfd);
Expand Down