diff --git a/mk/windoze/vc2012/g2xml.vcxproj b/mk/windoze/vc2012/g2xml.vcxproj index 753b7ecb..c3f34ed6 100644 --- a/mk/windoze/vc2012/g2xml.vcxproj +++ b/mk/windoze/vc2012/g2xml.vcxproj @@ -150,7 +150,7 @@ Level3 ProgramDatabase true - StreamingSIMDExtensions2 + AdvancedVectorExtensions true diff --git a/mk/windoze/vc2012/g3d_viewer.vcxproj b/mk/windoze/vc2012/g3d_viewer.vcxproj index 9a0aa049..9333e6d3 100644 --- a/mk/windoze/vc2012/g3d_viewer.vcxproj +++ b/mk/windoze/vc2012/g3d_viewer.vcxproj @@ -192,7 +192,7 @@ true Async MultiThreaded - StreamingSIMDExtensions2 + AdvancedVectorExtensions diff --git a/mk/windoze/vc2012/glest_editor.vcxproj b/mk/windoze/vc2012/glest_editor.vcxproj index 1110d469..62424df6 100644 --- a/mk/windoze/vc2012/glest_editor.vcxproj +++ b/mk/windoze/vc2012/glest_editor.vcxproj @@ -191,7 +191,7 @@ true Async MultiThreaded - StreamingSIMDExtensions2 + AdvancedVectorExtensions diff --git a/mk/windoze/vc2012/glest_game.vcxproj b/mk/windoze/vc2012/glest_game.vcxproj index d1eea158..a1b5d1cd 100644 --- a/mk/windoze/vc2012/glest_game.vcxproj +++ b/mk/windoze/vc2012/glest_game.vcxproj @@ -254,12 +254,12 @@ false ../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/platform/win32;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/shared_lib/include/xml/rapidxml;../../../source/glest_game/ai;../../../source/glest_game/facilities;../../../source/glest_game/game;../../../source/glest_game/global;../../../source/glest_game/graphics;../../../source/glest_game/gui;../../../source/glest_game/main;../../../source/glest_game/menu;../../../source/glest_game/network;../../../source/glest_game/sound;../../../source/glest_game/type_instances;../../../source/glest_game/types;../../../source/glest_game/world;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/compression %(AdditionalUsingDirectories) - WIN32;NDEBUG;_LIB;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP_XXX;STREFLOP_SSE_XXX;LIBM_COMPILING_FLT32_XXX;CURL_STATICLIB;UNICODE;XERCES_STATIC_LIBRARY;GLEW_STATIC;USE_FREETYPEGL;STATICLIB;USE_FTGL;FTGL_LIBRARY_STATIC;ZLIB_WINAPI;HAVE_GOOGLE_BREAKPAD_XXX;%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP_XXX;STREFLOP_SSE_XXX;LIBM_COMPILING_FLT32_XXX;CURL_STATICLIB;UNICODE;XERCES_STATIC_LIBRARY;GLEW_STATIC;USE_FREETYPEGL_XXX;STATICLIB;USE_FTGL;FTGL_LIBRARY_STATIC;ZLIB_WINAPI;HAVE_GOOGLE_BREAKPAD_XXX;%(PreprocessorDefinitions) true Async MultiThreaded true - StreamingSIMDExtensions2 + AdvancedVectorExtensions Precise $(OutDir)$(TargetName).pdb Level3 diff --git a/mk/windoze/vc2012/megaglest_tests.vcxproj b/mk/windoze/vc2012/megaglest_tests.vcxproj index 8599634f..270a9963 100644 --- a/mk/windoze/vc2012/megaglest_tests.vcxproj +++ b/mk/windoze/vc2012/megaglest_tests.vcxproj @@ -168,7 +168,7 @@ ../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/platform/win32;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/shared_lib/include/xml/rapidxml;../../../source/glest_game/ai;../../../source/glest_game/facilities;../../../source/glest_game/game;../../../source/glest_game/global;../../../source/glest_game/graphics;../../../source/glest_game/gui;../../../source/glest_game/main;../../../source/glest_game/menu;../../../source/glest_game/network;../../../source/glest_game/sound;../../../source/glest_game/type_instances;../../../source/glest_game/types;../../../source/glest_game/world;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/windows_deps_2012/cppunit/include MultiThreaded Fast - StreamingSIMDExtensions2 + AdvancedVectorExtensions Console diff --git a/mk/windoze/vc2012/shared_lib.vcxproj b/mk/windoze/vc2012/shared_lib.vcxproj index 12a6d1ca..b63ac2b8 100644 --- a/mk/windoze/vc2012/shared_lib.vcxproj +++ b/mk/windoze/vc2012/shared_lib.vcxproj @@ -200,12 +200,12 @@ Speed false ../../../source/shared_lib/include;../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/sound/ds8;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/sound/openal;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/shared_lib/include/platform/miniupnpc;../../../source/shared_lib/include/libircclient/include;../../../source/shared_lib/include/feathery_ftp;../../../source/windows_deps_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/graphics/md5;../../../source/shared_lib/include/graphics/freetype-gl;../../../source/shared_lib/include/xml/rapidxml;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/platform/win32;../../../source/windows_deps_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/ - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP_XXX;STREFLOP_SSE_XXX;STREFLOP_RANDOM_GEN_SIZE_XXX=32;LIBM_COMPILING_FLT32_XXX;CURL_STATICLIB;UNICODE;USE_FTGL;FTGL_LIBRARY_STATIC;TA3D_PLATFORM_MSVC;TA3D_PLATFORM_WINDOWS;STATICLIB;USE_FREETYPEGL;XERCES_STATIC_LIBRARY;GLEW_STATIC;XML_LIBRARY;ZLIB_WINAPI;HAS_LIBVLC_XXX;HAVE_FRIBIDI;HAVE_GOOGLE_BREAKPAD_XXX;%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP_XXX;STREFLOP_SSE_XXX;STREFLOP_RANDOM_GEN_SIZE_XXX=32;LIBM_COMPILING_FLT32_XXX;CURL_STATICLIB;UNICODE;USE_FTGL;FTGL_LIBRARY_STATIC;TA3D_PLATFORM_MSVC;TA3D_PLATFORM_WINDOWS;STATICLIB;USE_FREETYPEGL_XXX;XERCES_STATIC_LIBRARY;GLEW_STATIC;XML_LIBRARY;ZLIB_WINAPI;HAS_LIBVLC_XXX;HAVE_FRIBIDI;HAVE_GOOGLE_BREAKPAD_XXX;%(PreprocessorDefinitions) true Async MultiThreaded true - StreamingSIMDExtensions2 + AdvancedVectorExtensions Precise true $(OutDir)$(ProjectName).pdb diff --git a/mk/windoze/vc2012/xml2g.vcxproj b/mk/windoze/vc2012/xml2g.vcxproj index 55b46fb0..c02781f2 100644 --- a/mk/windoze/vc2012/xml2g.vcxproj +++ b/mk/windoze/vc2012/xml2g.vcxproj @@ -160,7 +160,7 @@ Level3 ProgramDatabase true - StreamingSIMDExtensions2 + AdvancedVectorExtensions wsock32.lib;libxml2_a.lib;%(AdditionalDependencies) diff --git a/source/glest_game/facilities/game_util.cpp b/source/glest_game/facilities/game_util.cpp index 6d0086c9..fff73a46 100644 --- a/source/glest_game/facilities/game_util.cpp +++ b/source/glest_game/facilities/game_util.cpp @@ -36,7 +36,7 @@ const string SVN_Rev = string("Rev: ") + string(SVNVERSION); const string SVN_RawRev = string(SVNVERSION); const string SVN_Rev = string("Rev: ") + string(SVNVERSION); #else -const string SVN_RawRev = "$4682$"; +const string SVN_RawRev = "$4704$"; const string SVN_Rev = "$Rev$"; #endif diff --git a/source/shared_lib/include/platform/posix/socket.h b/source/shared_lib/include/platform/posix/socket.h index 359f1e36..8a5cb9c4 100644 --- a/source/shared_lib/include/platform/posix/socket.h +++ b/source/shared_lib/include/platform/posix/socket.h @@ -21,6 +21,11 @@ #endif typedef SOCKET PLATFORM_SOCKET; + #if defined(_WIN64) + #define PLATFORM_SOCKET_FORMAT_TYPE MG_I64U_SPECIFIER + #else + #define PLATFORM_SOCKET_FORMAT_TYPE "%d" + #endif #else #include #include @@ -29,7 +34,7 @@ #include typedef int PLATFORM_SOCKET; - + #define PLATFORM_SOCKET_FORMAT_TYPE "%d" #endif #include diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index 49bc5a65..bace6026 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -1422,7 +1422,7 @@ int Socket::receive(void *data, int dataSize, bool tryReceiveUntilDataSizeMet) { if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"[%s::%s Line: %d] DISCONNECTED SOCKET error while receiving socket data, bytesReceived = %d, error = %s, dataSize = %d, tryReceiveUntilDataSizeMet = %d\n",__FILE__,__FUNCTION__,__LINE__,bytesReceived,getLastSocketErrorFormattedText(&iErr).c_str(),dataSize,tryReceiveUntilDataSizeMet); } else if(tryReceiveUntilDataSizeMet == true && bytesReceived < dataSize) { - int newBufferSize = (dataSize - bytesReceived); + int newBufferSize = (dataSize - (int)bytesReceived); if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] WARNING, attempting to receive MORE data, bytesReceived = %d, dataSize = %d, newBufferSize = %d\n",__FILE__,__FUNCTION__,__LINE__,bytesReceived,dataSize,newBufferSize); if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\nIn [%s::%s Line: %d] WARNING, attempting to receive MORE data, bytesReceived = %d, dataSize = %d, newBufferSize = %d\n",__FILE__,__FUNCTION__,__LINE__,(int)bytesReceived,dataSize,newBufferSize); @@ -1966,7 +1966,7 @@ void ClientSocket::connect(const Ip &ip, int port) errno = 0; if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] Apparent recovery for connection sock = %d, err = %d\n",__FILE__,__FUNCTION__,__LINE__,sock,err); - if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Apparent recovery for connection sock = %d, err = %d\n",__FILE__,__FUNCTION__,__LINE__,sock,err); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Apparent recovery for connection sock = " PLATFORM_SOCKET_FORMAT_TYPE ", err = %d\n",__FILE__,__FUNCTION__,__LINE__,sock,err); break; } @@ -1982,18 +1982,18 @@ void ClientSocket::connect(const Ip &ip, int port) if(err < 0) { if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] Before END sock = %d, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,err,getLastSocketErrorFormattedText().c_str()); - if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Before END sock = %d, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,err,getLastSocketErrorFormattedText().c_str()); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Before END sock = " PLATFORM_SOCKET_FORMAT_TYPE ", err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,err,getLastSocketErrorFormattedText().c_str()); disconnectSocket(); } else { if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] Valid recovery for connection sock = %d, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,err,getLastSocketErrorFormattedText().c_str()); - if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Valid recovery for connection sock = %d, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,err,getLastSocketErrorFormattedText().c_str()); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Valid recovery for connection sock = " PLATFORM_SOCKET_FORMAT_TYPE ", err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,err,getLastSocketErrorFormattedText().c_str()); connectedIpAddress = ip.getString(); } } else { if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"Connected to host [%s] on port = %d sock = %d err = %d", ip.getString().c_str(),port,sock,err); - if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Connected to host [%s] on port = %d sock = %d err = %d", ip.getString().c_str(),port,sock,err); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Connected to host [%s] on port = %d sock = " PLATFORM_SOCKET_FORMAT_TYPE " err = %d", ip.getString().c_str(),port,sock,err); connectedIpAddress = ip.getString(); } } @@ -2307,7 +2307,7 @@ void ServerSocket::bind(int port) { int err= ::bind(sock, reinterpret_cast(&addr), sizeof(addr)); if(err < 0) { char szBuf[8096]=""; - snprintf(szBuf, 8096,"In [%s::%s] Error binding socket sock = %d, address [%s] port = %d err = %d, error = %s\n",__FILE__,__FUNCTION__,sock,this->bindSpecificAddress.c_str(),port,err,getLastSocketErrorFormattedText().c_str()); + snprintf(szBuf, 8096,"In [%s::%s] Error binding socket sock = " PLATFORM_SOCKET_FORMAT_TYPE ", address [%s] port = %d err = %d, error = %s\n",__FILE__,__FUNCTION__,sock,this->bindSpecificAddress.c_str(),port,err,getLastSocketErrorFormattedText().c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"%s",szBuf); snprintf(szBuf, 8096,"Error binding socket sock = %d, address [%s] port = %d err = %d, error = %s\n",sock,this->bindSpecificAddress.c_str(),port,err,getLastSocketErrorFormattedText().c_str()); @@ -2344,7 +2344,7 @@ void ServerSocket::listen(int connectionQueueSize) { int err= ::listen(sock, connectionQueueSize); if(err < 0) { char szBuf[8096]=""; - snprintf(szBuf, 8096,"In [%s::%s] Error listening socket sock = %d, err = %d, error = %s\n",__FILE__,__FUNCTION__,sock,err,getLastSocketErrorFormattedText().c_str()); + snprintf(szBuf, 8096,"In [%s::%s] Error listening socket sock = " PLATFORM_SOCKET_FORMAT_TYPE ", err = %d, error = %s\n",__FILE__,__FUNCTION__,sock,err,getLastSocketErrorFormattedText().c_str()); throwException(szBuf); } } @@ -2391,7 +2391,7 @@ Socket *ServerSocket::accept(bool errorOnFail) { if(isSocketValid(&newSock) == false) { char szBuf[8096]=""; - snprintf(szBuf, 8096,"In [%s::%s Line: %d] Error accepting socket connection sock = %d, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,newSock,getLastSocketErrorFormattedText().c_str()); + snprintf(szBuf, 8096,"In [%s::%s Line: %d] Error accepting socket connection sock = " PLATFORM_SOCKET_FORMAT_TYPE ", err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,sock,newSock,getLastSocketErrorFormattedText().c_str()); if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] %s\n",__FILE__,__FUNCTION__,__LINE__,szBuf); int lastSocketError = getLastSocketError();