From 411cdf39fc2b961a970a0ae91b9059614251247e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 28 Aug 2012 17:42:54 +0000 Subject: Loads of win32 compilation issues fixed. Most are fairly minor unsigned/signed mismatches because of socket handles, but there were also some order-of-definition issues that were fixed in the FD_SETSIZE definition code. Fixed a few things that just never worked on windows, like Bu::Thread::yield(). --- src/stable/tcpserversocket.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/stable/tcpserversocket.h') diff --git a/src/stable/tcpserversocket.h b/src/stable/tcpserversocket.h index 0f56bd6..9776668 100644 --- a/src/stable/tcpserversocket.h +++ b/src/stable/tcpserversocket.h @@ -37,9 +37,14 @@ namespace Bu class TcpServerSocket { public: +#ifdef WIN32 + typedef unsigned int socket_t; +#else + typedef int socket_t; +#endif TcpServerSocket( int nPort, int nPoolSize=40 ); TcpServerSocket( const String &sAddr, int nPort, int nPoolSize=40 ); - TcpServerSocket( int nSocket, bool bInit, int nPoolSize=40 ); + TcpServerSocket( socket_t nSocket, bool bInit, int nPoolSize=40 ); TcpServerSocket( const TcpServerSocket &rSrc ); virtual ~TcpServerSocket(); @@ -52,11 +57,7 @@ namespace Bu void initServer( struct sockaddr_in &name, int nPoolSize ); fd_set fdActive; -#ifdef WIN32 - unsigned int nServer; -#else - int nServer; -#endif + socket_t nServer; int nPort; }; } -- cgit v1.2.3