From 1700e90a155ad8dacd280c021069fa6c8ee77bb0 Mon Sep 17 00:00:00 2001 From: janwas Date: Sat, 19 Jan 2008 11:44:41 +0000 Subject: [PATCH] fix VC9 warning*, update some comments, remove old VC6 workarounds * http://www.wildfiregames.com/forum/index.php?showtopic=11479&hl= This was SVN commit r5564. --- source/lib/sysdep/win/win.h | 56 ++++--------------------------------- 1 file changed, 6 insertions(+), 50 deletions(-) diff --git a/source/lib/sysdep/win/win.h b/source/lib/sysdep/win/win.h index 8901eaf47b..bfdc63d556 100644 --- a/source/lib/sysdep/win/win.h +++ b/source/lib/sysdep/win/win.h @@ -23,8 +23,8 @@ #define VC_EXTRALEAN -// the public header, win.h, has defined _WINDOWS_ so that -// other code doesn't include when it shouldn't (e.g. zconf.h) +// other headers may have defined 's include guard to prevent +// external libraries from pulling it in (which would cause conflicts). #undef _WINDOWS_ // set version; needed for EnumDisplayDevices @@ -76,57 +76,11 @@ //----------------------------------------------------------------------------- -// fixes for VC6 platform SDK -//----------------------------------------------------------------------------- - -// VC6 windows.h doesn't define these -#ifndef DWORD_PTR -#define DWORD_PTR DWORD -#endif - -#ifndef INVALID_FILE_ATTRIBUTES -#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) -#endif - -#ifndef PROCESSOR_ARCHITECTURE_AMD64 -#define PROCESSOR_ARCHITECTURE_AMD64 9 -#endif - -#if WINVER < 0x500 - -// can't test for macro definition - -// actual definitions in winnt.h are typedefs. -typedef unsigned __int64 DWORDLONG; -typedef DWORD ULONG_PTR; - -#if MSC_VERSION >= 1300 -typedef __w64 unsigned long* PULONG_PTR; -#else -typedef unsigned long* PULONG_PTR; -#endif - -typedef struct _MEMORYSTATUSEX -{ - DWORD dwLength; - DWORD dwMemoryLoad; - DWORDLONG ullTotalPhys; - DWORDLONG ullAvailPhys; - DWORDLONG ullTotalPageFile; - DWORDLONG ullAvailPageFile; - DWORDLONG ullTotalVirtual; - DWORDLONG ullAvailVirtual; - DWORDLONG ullAvailExtendedVirtual; -} MEMORYSTATUSEX, *LPMEMORYSTATUSEX; - -#endif // #if WINVER < 0x500 - - -//----------------------------------------------------------------------------- -// powrprof.h (not there at all in VC6, missing some parts in VC7) +// powrprof.h (missing some parts in VC7) //----------------------------------------------------------------------------- // MinGW headers are already correct; only change on VC -#if MSC_VERSION +#if MSC_VERSION && MSC_VERSION < 1400 #ifndef NTSTATUS #define NTSTATUS long @@ -280,7 +234,9 @@ typedef struct _PROCESSOR_POWER_INFORMATION // so this is not inside the above #ifndef section) // // missing from dbghelp's list +#ifndef __out_xcount # define __out_xcount(s) +#endif //