From e37ecb056729945b9db127ed24747c911c045670 Mon Sep 17 00:00:00 2001 From: Thomas Fischer Date: Sat, 15 Mar 2014 13:43:48 +0100 Subject: [PATCH] fixed WIN64 precompiler flags up - basics --- Engine/source/platform/types.codewarrior.h | 4 ++++ Engine/source/platform/types.gcc.h | 4 ++++ Engine/source/platform/types.visualc.h | 12 ++++++++---- Engine/source/platform/types.win32.h | 7 ++++++- Engine/source/platform/typesWin32.h | 5 +++++ 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/Engine/source/platform/types.codewarrior.h b/Engine/source/platform/types.codewarrior.h index 64912784d..38d9d1d49 100644 --- a/Engine/source/platform/types.codewarrior.h +++ b/Engine/source/platform/types.codewarrior.h @@ -51,6 +51,10 @@ typedef unsigned long long U64; ///< Compiler independent Unsigned 64-bit in //-------------------------------------- // Identify the Operating System +#if defined(_WIN64) +# define TORQUE_OS_STRING "Win64" +# define TORQUE_OS_WIN64 +# include "platform/types.win32.h" #if defined(_WIN32) # define TORQUE_OS_STRING "Win32" # define TORQUE_OS_WIN32 diff --git a/Engine/source/platform/types.gcc.h b/Engine/source/platform/types.gcc.h index 406b07ef1..e7f0f6953 100644 --- a/Engine/source/platform/types.gcc.h +++ b/Engine/source/platform/types.gcc.h @@ -55,6 +55,10 @@ typedef unsigned long long U64; //-------------------------------------- // Identify the Operating System +#if defined(_WIN64) +# define TORQUE_OS_STRING "Win64" +# define TORQUE_OS_WIN64 +# include "platform/types.win32.h" #if defined(__WIN32__) || defined(_WIN32) # define TORQUE_OS_STRING "Win32" # define TORQUE_OS_WIN32 diff --git a/Engine/source/platform/types.visualc.h b/Engine/source/platform/types.visualc.h index 5fbdaf64f..1ae8d5113 100644 --- a/Engine/source/platform/types.visualc.h +++ b/Engine/source/platform/types.visualc.h @@ -59,10 +59,14 @@ typedef unsigned _int64 U64; # define TORQUE_OS_STRING "Xbox" # define TORQUE_OS_XBOX # include "platform/types.win32.h" -#elif defined(_WIN32) +#elif defined( _WIN32 ) # define TORQUE_OS_STRING "Win32" # define TORQUE_OS_WIN32 # include "platform/types.win32.h" +#elif defined( _WIN64 ) +# define TORQUE_OS_STRING "Win64" +# define TORQUE_OS_WIN64 +# include "platform/types.win32.h" #else # error "VC: Unsupported Operating System" #endif @@ -70,17 +74,17 @@ typedef unsigned _int64 U64; //-------------------------------------- // Identify the CPU -#if defined(_M_X64) +#if defined( _M_X64 ) # define TORQUE_CPU_STRING "x64" # define TORQUE_CPU_X64 # define TORQUE_LITTLE_ENDIAN -#elif defined(_M_IX86) +#elif defined( _M_IX86 ) # define TORQUE_CPU_STRING "x86" # define TORQUE_CPU_X86 # define TORQUE_LITTLE_ENDIAN # define TORQUE_SUPPORTS_NASM # define TORQUE_SUPPORTS_VC_INLINE_X86_ASM -#elif defined(TORQUE_OS_XENON) +#elif defined( TORQUE_OS_XENON ) # define TORQUE_CPU_STRING "ppc" # define TORQUE_CPU_PPC # define TORQUE_BIG_ENDIAN diff --git a/Engine/source/platform/types.win32.h b/Engine/source/platform/types.win32.h index d95d3cec5..68e0e3a63 100644 --- a/Engine/source/platform/types.win32.h +++ b/Engine/source/platform/types.win32.h @@ -29,7 +29,12 @@ // size_t is needed to overload new // size_t tends to be OS and compiler specific and may need to // be if/def'ed in the future -typedef unsigned int dsize_t; + +#ifdef _WIN64 +typedef unsigned long long dsize_t; +#else +typedef unsigned int dsize_t; +#endif // _WIN64 /// Platform dependent file date-time structure. The definition of this structure diff --git a/Engine/source/platform/typesWin32.h b/Engine/source/platform/typesWin32.h index c4b2aa2b2..029b1a341 100644 --- a/Engine/source/platform/typesWin32.h +++ b/Engine/source/platform/typesWin32.h @@ -76,7 +76,12 @@ typedef double F64; ///< Compiler independent 64-bit float // size_t is needed to overload new // size_t tends to be OS and compiler specific and may need to // be if/def'ed in the future + +#ifdef _WIN64 +typedef unsigned long long dsize_t; +#else typedef unsigned int dsize_t; +#endif // _WIN64 typedef const char* StringTableEntry;