summaryrefslogtreecommitdiff
path: root/extra/yassl/src/socket_wrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extra/yassl/src/socket_wrapper.cpp')
-rw-r--r--extra/yassl/src/socket_wrapper.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp
index 1be6a715980..00f9c8d170c 100644
--- a/extra/yassl/src/socket_wrapper.cpp
+++ b/extra/yassl/src/socket_wrapper.cpp
@@ -28,7 +28,7 @@
#include "socket_wrapper.hpp"
-#ifndef WIN32
+#ifndef _WIN32
#include <errno.h>
#include <netdb.h>
#include <unistd.h>
@@ -36,19 +36,19 @@
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <string.h>
-#endif // WIN32
+#endif // _WIN32
#ifdef __sun
#include <sys/filio.h>
#endif
-#ifdef WIN32
+#ifdef _WIN32
const int SOCKET_EINVAL = WSAEINVAL;
const int SOCKET_EWOULDBLOCK = WSAEWOULDBLOCK;
#else
const int SOCKET_EINVAL = EINVAL;
const int SOCKET_EWOULDBLOCK = EWOULDBLOCK;
-#endif // WIN32
+#endif // _WIN32
namespace yaSSL {
@@ -80,7 +80,7 @@ Socket::~Socket()
void Socket::closeSocket()
{
if (socket_ != INVALID_SOCKET) {
-#ifdef WIN32
+#ifdef _WIN32
closesocket(socket_);
#else
close(socket_);
@@ -94,7 +94,7 @@ uint Socket::get_ready() const
{
unsigned long ready = 0;
-#ifdef WIN32
+#ifdef _WIN32
ioctlsocket(socket_, FIONREAD, &ready);
#else
ioctl(socket_, FIONREAD, &ready);
@@ -145,7 +145,7 @@ void Socket::shutDown(int how)
int Socket::get_lastError()
{
-#ifdef WIN32
+#ifdef _WIN32
return WSAGetLastError();
#else
return errno;
@@ -155,7 +155,7 @@ int Socket::get_lastError()
void Socket::set_lastError(int errorCode)
{
-#ifdef WIN32
+#ifdef _WIN32
WSASetLastError(errorCode);
#else
errno = errorCode;