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/compat/win32.cpp | 4 ++-- src/compat/win32.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compat') diff --git a/src/compat/win32.cpp b/src/compat/win32.cpp index 6488d5f..e1151b0 100644 --- a/src/compat/win32.cpp +++ b/src/compat/win32.cpp @@ -12,7 +12,7 @@ #define deffunc( name ) \ Bu::Winsock2::FNDEF_DYN_ ##name Bu::Winsock2::_fnptr_ ##name = NULL -char Bu::Winsock2::scode[15]; +char Bu::Winsock2::scode[32]; deffunc( WSAStartup ); deffunc( WSACleanup ); @@ -85,7 +85,7 @@ Bu::Winsock2::~Winsock2() char *Bu::Winsock2::gai_strerror( int iCode ) { - sprintf( scode, "%d", Bu::Winsock2::WSAGetLastError() ); + sprintf( scode, "%d (%d)", iCode, Bu::Winsock2::WSAGetLastError() ); return scode; } diff --git a/src/compat/win32.h b/src/compat/win32.h index 512e6d3..7e44c13 100644 --- a/src/compat/win32.h +++ b/src/compat/win32.h @@ -87,7 +87,7 @@ namespace Bu decltype( int, send, SOCKET s, const char *buf, int len, int flags ); decltype( int, __WSAFDIsSet, SOCKET s, fd_set *set ); - static char scode[15]; + static char scode[32]; static char *gai_strerror( int iCode ); }; -- cgit v1.2.3