[Plib-cvs] plib/src/net netMessage.h,1.8,1.9 netSocket.cxx,1.23,1.24
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2002-11-30 00:41:52
|
Update of /cvsroot/plib/plib/src/net In directory sc8-pr-cvs1:/tmp/cvs-serv1232/plib/src/net Modified Files: netMessage.h netSocket.cxx Log Message: Cleared up some compile errors...replaced more ad-hoc ifdef's with UL_whatever tokens. Index: netMessage.h =================================================================== RCS file: /cvsroot/plib/plib/src/net/netMessage.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- netMessage.h 2 Sep 2002 06:05:44 -0000 1.8 +++ netMessage.h 30 Nov 2002 00:41:49 -0000 1.9 @@ -42,7 +42,7 @@ #include "netBuffer.h" -#if defined(__CYGWIN__) || !defined (WIN32) +#ifndef UL_MSVC #include <netinet/in.h> // ntohs() etc prototypes #endif Index: netSocket.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/net/netSocket.cxx,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- netSocket.cxx 2 Sep 2002 06:05:44 -0000 1.23 +++ netSocket.cxx 30 Nov 2002 00:41:49 -0000 1.24 @@ -23,9 +23,9 @@ #include "netSocket.h" -#if defined(__CYGWIN__) || !defined (WIN32) +#if defined(UL_CYGWIN) || !defined (UL_WIN32) -#if defined(__APPLE__) +#if defined(UL_MAC_OSX) # include <netinet/in.h> #endif @@ -45,7 +45,7 @@ #endif -#if defined(_MSC_VER) && !defined(socklen_t) +#if defined(UL_MSVC) && !defined(socklen_t) #define socklen_t int #endif @@ -186,7 +186,7 @@ { assert ( handle != -1 ) ; -#if defined(__CYGWIN__) || !defined (WIN32) +#if defined(UL_CYGWIN) || !defined (UL_WIN32) int delay_flag = ::fcntl (handle, F_GETFL, 0); if (blocking) @@ -210,7 +210,7 @@ int result; if ( broadcast ) { int one = 1; -#ifdef WIN32 +#ifdef UL_WIN32 result = ::setsockopt( handle, SOL_SOCKET, SO_BROADCAST, (char*)&one, sizeof(one) ); #else result = ::setsockopt( handle, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one) ); @@ -292,7 +292,7 @@ { if ( handle != -1 ) { -#if defined(__CYGWIN__) || !defined (WIN32) +#if defined(UL_CYGWIN) || !defined (UL_WIN32) ::close( handle ); #else ::closesocket( handle ); @@ -304,7 +304,7 @@ bool netSocket::isNonBlockingError () { -#if defined(__CYGWIN__) || !defined (WIN32) +#if defined(UL_CYGWIN) || !defined (UL_WIN32) switch (errno) { case EWOULDBLOCK: // always == NET_EAGAIN? case EALREADY: @@ -403,7 +403,7 @@ /* Init/Exit functions */ static void netExit ( void ) { -#if defined(__CYGWIN__) || !defined (WIN32) +#if defined(UL_CYGWIN) || !defined (UL_WIN32) #else /* Clean up windows networking */ if ( WSACleanup() == SOCKET_ERROR ) { @@ -419,7 +419,7 @@ { assert ( sizeof(sockaddr_in) == sizeof(netAddress) ) ; -#if defined(__CYGWIN__) || !defined (WIN32) +#if defined(UL_CYGWIN) || !defined (UL_WIN32) #else /* Start up the windows networking */ WORD version_wanted = MAKEWORD(1,1); @@ -444,3 +444,5 @@ va_end(argptr); return( buffer ); } + + |