Browse Source

fixed WIN64 precompiler flags up - basics

Thomas Fischer 11 năm trước cách đây
mục cha
commit
e37ecb0567

+ 4 - 0
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

+ 4 - 0
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

+ 8 - 4
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

+ 6 - 1
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

+ 5 - 0
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;