From abc9111f962b53cb6ce84edf3bd434b3d0cc4482 Mon Sep 17 00:00:00 2001 From: Ianos Gnatiuc Date: Sun, 24 Sep 2006 14:26:09 +0000 Subject: [PATCH] Win64 build support --- golded3/golded3.cpp | 33 +++++++++++++++++++++++---------- goldlib/gall/gutlvers.cpp | 19 ++++++++++++++++--- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/golded3/golded3.cpp b/golded3/golded3.cpp index 3820729..d1ef1dd 100644 --- a/golded3/golded3.cpp +++ b/golded3/golded3.cpp @@ -98,16 +98,29 @@ #define __GVER_SHORTLOGNAME__ "2" #define __GVER_CFGEXT__ ".geo" #elif defined(__WIN32__) -#if defined(_MSC_VER) -#define __GVER_PLATFORM__ "/W32-MSVC" -#elif defined(__MINGW32__) -#define __GVER_PLATFORM__ "/W32-MINGW" -#else -#define __GVER_PLATFORM__ "/W32" -#endif -#define __GVER_SHORTPLATFORM__ "W32" -#define __GVER_SHORTLOGNAME__ "W" -#define __GVER_CFGEXT__ ".gew" + #if defined(_M_X64) + #if defined(_MSC_VER) + #define __GVER_PLATFORM__ "/W64-MSVC" + #elif defined(__MINGW32__) + #define __GVER_PLATFORM__ "/W64-MINGW" + #else + #define __GVER_PLATFORM__ "/W64" + #endif + #define __GVER_SHORTPLATFORM__ "W64" + #define __GVER_SHORTLOGNAME__ "W" + #define __GVER_CFGEXT__ ".gew" + #else + #if defined(_MSC_VER) + #define __GVER_PLATFORM__ "/W32-MSVC" + #elif defined(__MINGW32__) + #define __GVER_PLATFORM__ "/W32-MINGW" + #else + #define __GVER_PLATFORM__ "/W32" + #endif + #define __GVER_SHORTPLATFORM__ "W32" + #define __GVER_SHORTLOGNAME__ "W" + #define __GVER_CFGEXT__ ".gew" + #endif #elif defined(__linux__) #define __GVER_PLATFORM__ "/LNX" #define __GVER_SHORTPLATFORM__ "LNX" diff --git a/goldlib/gall/gutlvers.cpp b/goldlib/gall/gutlvers.cpp index d0def72..6457d52 100644 --- a/goldlib/gall/gutlvers.cpp +++ b/goldlib/gall/gutlvers.cpp @@ -49,6 +49,12 @@ // ------------------------------------------------------------------ +#if defined(_M_X64) +inline static bool HaveCPUID() +{ + return false; +} +#else inline static bool HaveCPUID() { // TO_PORT_TAG: CPUID @@ -73,6 +79,7 @@ inline static bool HaveCPUID() return false; #endif } +#endif // ------------------------------------------------------------------ @@ -326,12 +333,17 @@ static void cpuname(int family, int model, const char *v_name, char *m_name) // ------------------------------------------------------------------ +#if defined(_M_X64) +char *gcpuid(char *_cpuname) +{ + return ""; +} +#else char *gcpuid(char *_cpuname) { - #if defined(__GNUC__) && defined(__i386__) || defined(_MSC_VER) - - static struct scpuid_t{ + static struct scpuid_t + { dword cpu; /* x86, where x=cpu */ dword cpu_high; /* highest CPUID capability */ #if defined(_MSC_VER) @@ -541,6 +553,7 @@ char *gcpuid(char *_cpuname) return _cpuname; } +#endif // ------------------------------------------------------------------