summaryrefslogtreecommitdiff
path: root/extra/yassl/src/socket_wrapper.cpp
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com>2005-06-16 16:35:09 +0500
committerunknown <svoj@mysql.com>2005-06-16 16:35:09 +0500
commit0dabdf15a7f8d75eddc11f53f8ef87de3783b72d (patch)
treec92c38ffa34a246fd7cbc247a2d6dc5f7628263e /extra/yassl/src/socket_wrapper.cpp
parentfc465d1497ce598d07ec75eeaafc7ca84b578ee6 (diff)
downloadmariadb-git-0dabdf15a7f8d75eddc11f53f8ef87de3783b72d.tar.gz
WL#2286 - Compile MySQL w/YASSL support
Merge with latest yaSSL. extra/yassl/include/lock.hpp: Merge with latest yaSSL. extra/yassl/include/socket_wrapper.hpp: Merge with latest yaSSL. extra/yassl/mySTL/helpers.hpp: Merge with latest yaSSL. extra/yassl/src/lock.cpp: Merge with latest yaSSL. extra/yassl/src/log.cpp: Merge with latest yaSSL. extra/yassl/src/socket_wrapper.cpp: Merge with latest yaSSL. extra/yassl/src/ssl.cpp: Merge with latest yaSSL. extra/yassl/src/timer.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/include/misc.hpp: Merge with latest yaSSL. extra/yassl/taocrypt/include/random.hpp: Merge with latest yaSSL. extra/yassl/taocrypt/include/types.hpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/asn.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/integer.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/misc.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/random.cpp: Merge with latest yaSSL.
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;