Skip to content

Commit

Permalink
Replace usage of WIN32 macro with _WIN32
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed Aug 15, 2024
1 parent d27f2d4 commit 6e25ae4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/TCPSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ struct TCPSocket::Impl {
}

private:
#ifdef WIN32
#ifdef _WIN32
WSASession session_;
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/UDPSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct UDPSocket::Impl {
}

private:
#ifdef WIN32
#ifdef _WIN32
WSASession session_;
#endif
SOCKET sockfd_;
Expand Down
2 changes: 1 addition & 1 deletion src/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ inline void throwSocketError(const std::string& msg) {
inline void closeSocket(SOCKET socket) {

if (socket != INVALID_SOCKET) {
#ifdef WIN32
#ifdef _WIN32
closesocket(socket);
#else
shutdown(socket, SHUT_RD);
Expand Down
2 changes: 1 addition & 1 deletion src/port_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

int getAvailablePort(int startPort, int endPort, const std::vector<int>& excludePorts) {

#ifdef WIN32
#ifdef _WIN32
WSASession session;
#endif

Expand Down

0 comments on commit 6e25ae4

Please sign in to comment.