Better check for LP64 architectures

This commit is contained in:
Cameron Cawley 2023-11-16 22:20:19 +00:00
parent 141d3cf9c6
commit 66e32b8132
2 changed files with 12 additions and 4 deletions

View File

@ -373,8 +373,10 @@ extern "C" {
#elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER)
#define NK_SIZE_TYPE unsigned __int32 #define NK_SIZE_TYPE unsigned __int32
#elif defined(__GNUC__) || defined(__clang__) #elif defined(__GNUC__) || defined(__clang__)
#if defined(__x86_64__) || defined(__ppc64__) || defined(__PPC64__) || defined(__aarch64__) #ifdef __LP64__
#define NK_SIZE_TYPE unsigned long #define NK_SIZE_TYPE unsigned long
#elif defined(_WIN64)
#define NK_SIZE_TYPE unsigned long long
#else #else
#define NK_SIZE_TYPE unsigned int #define NK_SIZE_TYPE unsigned int
#endif #endif
@ -388,8 +390,10 @@ extern "C" {
#elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER)
#define NK_POINTER_TYPE unsigned __int32 #define NK_POINTER_TYPE unsigned __int32
#elif defined(__GNUC__) || defined(__clang__) #elif defined(__GNUC__) || defined(__clang__)
#if defined(__x86_64__) || defined(__ppc64__) || defined(__PPC64__) || defined(__aarch64__) #ifdef __LP64__
#define NK_POINTER_TYPE unsigned long #define NK_POINTER_TYPE unsigned long
#elif defined(_WIN64)
#define NK_POINTER_TYPE unsigned long long
#else #else
#define NK_POINTER_TYPE unsigned int #define NK_POINTER_TYPE unsigned int
#endif #endif

View File

@ -151,8 +151,10 @@ extern "C" {
#elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER)
#define NK_SIZE_TYPE unsigned __int32 #define NK_SIZE_TYPE unsigned __int32
#elif defined(__GNUC__) || defined(__clang__) #elif defined(__GNUC__) || defined(__clang__)
#if defined(__x86_64__) || defined(__ppc64__) || defined(__PPC64__) || defined(__aarch64__) #ifdef __LP64__
#define NK_SIZE_TYPE unsigned long #define NK_SIZE_TYPE unsigned long
#elif defined(_WIN64)
#define NK_SIZE_TYPE unsigned long long
#else #else
#define NK_SIZE_TYPE unsigned int #define NK_SIZE_TYPE unsigned int
#endif #endif
@ -166,8 +168,10 @@ extern "C" {
#elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER)
#define NK_POINTER_TYPE unsigned __int32 #define NK_POINTER_TYPE unsigned __int32
#elif defined(__GNUC__) || defined(__clang__) #elif defined(__GNUC__) || defined(__clang__)
#if defined(__x86_64__) || defined(__ppc64__) || defined(__PPC64__) || defined(__aarch64__) #ifdef __LP64__
#define NK_POINTER_TYPE unsigned long #define NK_POINTER_TYPE unsigned long
#elif defined(_WIN64)
#define NK_POINTER_TYPE unsigned long long
#else #else
#define NK_POINTER_TYPE unsigned int #define NK_POINTER_TYPE unsigned int
#endif #endif