Fix a few Windows compilation errors (VS2k10 fixups in arch_setup, typo in Crash)
authorMarc Cannon <vyhdycokio@gmail.com>
Sat, 19 Jan 2013 15:18:37 +0000 (10:18 -0500)
committerPat Mac <itgpmc@gmail.com>
Thu, 7 Feb 2013 09:36:17 +0000 (01:36 -0800)
src/archutils/Win32/Crash.cpp
src/archutils/Win32/arch_setup.h

index 0cc755b..c111d22 100644 (file)
@@ -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)
index 3990d51..1ba5dda 100644 (file)
@@ -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\r
+static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }\r
+#endif // #if _MSC_VER < 1600\r
 
 #if defined(_MSC_VER)
 #pragma warning (disable : 4201) // nonstandard extension used : nameless struct/union (Windows headers do this)