From 590e0f8a15275f7d5d6cd6d80d2cd23432d9d7a8 Mon Sep 17 00:00:00 2001 From: Marc Cannon Date: Sat, 19 Jan 2013 10:18:37 -0500 Subject: [PATCH] Fix a few Windows compilation errors (VS2k10 fixups in arch_setup, typo in Crash) --- src/archutils/Win32/Crash.cpp | 2 +- src/archutils/Win32/arch_setup.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/archutils/Win32/Crash.cpp b/src/archutils/Win32/Crash.cpp index 0cc755b6..c111d229 100644 --- a/src/archutils/Win32/Crash.cpp +++ b/src/archutils/Win32/Crash.cpp @@ -788,7 +788,7 @@ static bool ReportCallStack( HWND hwnd, HANDLE hFile, const void **Backtrace ) if( g_debugInfo.nBuildNumber != int(VersionNumber) ) { Report( hwnd, hFile, - "Incorrect %s file (build %d, expected %d) -- call stack unavailable.").c_str(), + "Incorrect %s file (build %d, expected %d) -- call stack unavailable.", g_debugInfo.sFilename, g_debugInfo.nBuildNumber, int(VersionNumber) diff --git a/src/archutils/Win32/arch_setup.h b/src/archutils/Win32/arch_setup.h index 3990d51a..1ba5ddae 100644 --- a/src/archutils/Win32/arch_setup.h +++ b/src/archutils/Win32/arch_setup.h @@ -23,9 +23,8 @@ #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN -/* Pull in NT-only definitions. Note that we support Win98 and WinME; you can make - * NT calls, but be sure to fall back on 9x if they're not supported. */ -#define _WIN32_WINNT 0x0400 +/* Pull in NT-only definitions. We support Windows XP onward. */ +#define _WIN32_WINNT 0x0500 /* If this isn't defined to 0, VC fails to define things like stat and alloca. */ #define __STDC__ 0 @@ -63,7 +62,9 @@ typedef unsigned int uint32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #endif -static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; } +#if _MSC_VER < 1600 // 1600 = VC++ 2010 +static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; } +#endif // #if _MSC_VER < 1600 #if defined(_MSC_VER) #pragma warning (disable : 4201) // nonstandard extension used : nameless struct/union (Windows headers do this) -- 2.11.0