X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fplatform.h;h=d5b15580f7c2c9841a509a071d9503124c5cf77f;hb=60905b7f08ae9a2c88299731a8ce490c31d8b6e0;hp=6587f9e3380b3d8aef14760568b1c716f74d93f6;hpb=534881ab3184952023d05c6aa739bc7fcf8da82a;p=rocksndiamonds.git diff --git a/src/libgame/platform.h b/src/libgame/platform.h index 6587f9e3..d5b15580 100644 --- a/src/libgame/platform.h +++ b/src/libgame/platform.h @@ -12,9 +12,9 @@ #ifndef PLATFORM_H #define PLATFORM_H -/* ========================================================================= */ -/* define main platform keywords */ -/* ========================================================================= */ +// ============================================================================ +// define main platform keywords +// ============================================================================ #if defined(WIN32) || defined(_WIN32) #define PLATFORM_WIN32 @@ -25,9 +25,9 @@ #endif -/* ========================================================================= */ -/* define additional platform keywords */ -/* ========================================================================= */ +// ============================================================================ +// define additional platform keywords +// ============================================================================ #if defined(_AIX) #define PLATFORM_AIX @@ -154,9 +154,22 @@ #endif -/* ========================================================================= */ -/* define additional target keywords */ -/* ========================================================================= */ +// ============================================================================ +// define additional platform keywords for CPU architecture +// ============================================================================ + +#if defined(__x86_64__) || defined(__LP64__) || defined(_LP64) +#define PLATFORM_64_BIT +#define PLATFORM_XX_BIT_STRING "64-bit" +#else +#define PLATFORM_32_BIT +#define PLATFORM_XX_BIT_STRING "32-bit" +#endif + + +// ============================================================================ +// define additional target keywords +// ============================================================================ #if defined(TARGET_SDL2) #ifndef TARGET_SDL @@ -165,4 +178,4 @@ #endif -#endif /* PLATFORM_H */ +#endif // PLATFORM_H