@@ -154,7 +154,7 @@ Int UDP::Bind(UnsignedInt IP,UnsignedShort Port)
154154 addr.sin_port =Port;
155155 addr.sin_addr .s_addr =IP;
156156 fd=socket (AF_INET,SOCK_DGRAM,DEFAULT_PROTOCOL);
157- #ifdef _WINDOWS
157+ #ifdef _WIN32
158158 if (fd==SOCKET_ERROR)
159159 fd=-1 ;
160160 #endif
@@ -163,7 +163,7 @@ Int UDP::Bind(UnsignedInt IP,UnsignedShort Port)
163163
164164 retval=bind (fd,(struct sockaddr *)&addr,sizeof (addr));
165165
166- #ifdef _WINDOWS
166+ #ifdef _WIN32
167167 if (retval==SOCKET_ERROR)
168168 {
169169 retval=-1 ;
@@ -201,7 +201,7 @@ Int UDP::getLocalAddr(UnsignedInt &ip, UnsignedShort &port)
201201// private function
202202Int UDP::SetBlocking (Int block)
203203{
204- #ifdef _WINDOWS
204+ #ifdef _WIN32
205205 unsigned long flag=1 ;
206206 if (block)
207207 flag=0 ;
@@ -244,7 +244,7 @@ Int UDP::Write(const unsigned char *msg,UnsignedInt len,UnsignedInt IP,UnsignedS
244244
245245 ClearStatus ();
246246 retval=sendto (fd,(const char *)msg,len,0 ,(struct sockaddr *)&to,sizeof (to));
247- #ifdef _WINDOWS
247+ #ifdef _WIN32
248248 if (retval==SOCKET_ERROR)
249249 {
250250 retval=-1 ;
@@ -267,7 +267,7 @@ Int UDP::Read(unsigned char *msg,UnsignedInt len,sockaddr_in *from)
267267 if (from!=NULL )
268268 {
269269 retval=recvfrom (fd,(char *)msg,len,0 ,(struct sockaddr *)from,&alen);
270- #ifdef _WINDOWS
270+ #ifdef _WIN32
271271 if (retval == SOCKET_ERROR)
272272 {
273273 if (WSAGetLastError () != WSAEWOULDBLOCK)
@@ -288,7 +288,7 @@ Int UDP::Read(unsigned char *msg,UnsignedInt len,sockaddr_in *from)
288288 else
289289 {
290290 retval=recvfrom (fd,(char *)msg,len,0 ,NULL ,NULL );
291- #ifdef _WINDOWS
291+ #ifdef _WIN32
292292 if (retval==SOCKET_ERROR)
293293 {
294294 if (WSAGetLastError () != WSAEWOULDBLOCK)
@@ -312,7 +312,7 @@ Int UDP::Read(unsigned char *msg,UnsignedInt len,sockaddr_in *from)
312312
313313void UDP::ClearStatus (void )
314314{
315- #ifndef _WINDOWS
315+ #ifndef _WIN32
316316 errno=0 ;
317317 #endif
318318
@@ -322,7 +322,7 @@ void UDP::ClearStatus(void)
322322UDP::sockStat UDP::GetStatus (void )
323323{
324324 Int status = m_lastError;
325- #ifdef _WINDOWS
325+ #ifdef _WIN32
326326 // int status=WSAGetLastError();
327327 switch (status) {
328328 case NO_ERROR:
0 commit comments