X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fnet%2Fdatagramsocket.cpp;h=0e405d6f0cb7972fed62e418d447a2dc4c303b31;hp=664c2659de69ec43eaf9a0a0097d77522e84f58a;hb=136c9eec2b72bfad4788908de5552fbd62216148;hpb=ebbf753626c9e5dd26743c379741c53f9f11866e diff --git a/source/net/datagramsocket.cpp b/source/net/datagramsocket.cpp index 664c265..0e405d6 100644 --- a/source/net/datagramsocket.cpp +++ b/source/net/datagramsocket.cpp @@ -1,4 +1,4 @@ -#ifdef WIN32 +#ifdef _WIN32 #include #endif #include @@ -15,7 +15,7 @@ namespace Net { DatagramSocket::DatagramSocket(Family f, int p): ClientSocket(f, SOCK_DGRAM, p) { -#ifdef WIN32 +#ifdef _WIN32 WSAEventSelect(priv->handle, *priv->event, FD_READ|FD_CLOSE); #endif set_events(IO::P_INPUT); @@ -28,7 +28,7 @@ bool DatagramSocket::connect(const SockAddr &addr) int err = ::connect(priv->handle, reinterpret_cast(&sa.addr), sa.size); if(err==-1) { -#ifdef WIN32 +#ifdef _WIN32 throw system_error("connect", WSAGetLastError()); #else throw system_error("connect"); @@ -62,7 +62,7 @@ unsigned DatagramSocket::sendto(const char *buf, unsigned size, const SockAddr & return 0; else { -#ifdef WIN32 +#ifdef _WIN32 throw system_error("sendto", WSAGetLastError()); #else throw system_error("sendto"); @@ -86,7 +86,7 @@ unsigned DatagramSocket::recvfrom(char *buf, unsigned size, SockAddr *&from_addr return 0; else { -#ifdef WIN32 +#ifdef _WIN32 throw system_error("recvfrom", WSAGetLastError()); #else throw system_error("recvfrom");