From 8bbff718ae21fe7bd124b16ccbabbd4f57a9dbf6 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Wed, 5 Jun 2013 12:28:53 +0600 Subject: [PATCH] Define universal answer of SIZEOF_VOIDP for 32/64-bit architectures. This commit makes SDL_config.h universal, so it can be used with mixed 32 and 64 enviroment simultaneously. --- include/SDL_config.h.cmake | 8 +++++++- include/SDL_config.h.in | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake index 8423be702..12c14fa24 100644 --- a/include/SDL_config.h.cmake +++ b/include/SDL_config.h.cmake @@ -37,7 +37,13 @@ #cmakedefine volatile @HAVE_VOLATILE@ /* C datatypes */ -#cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@ +/* Define SIZEOF_VOIDP for 64/32 architectures */ +#ifdef __LP64__ +#define SIZEOF_VOIDP 8 +#else +#define SIZEOF_VOIDP 4 +#endif + #cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@ #cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@ #cmakedefine HAVE_PTHREAD_SPINLOCK @HAVE_PTHREAD_SPINLOCK@ diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index 7c5d9bf97..d751d8ed9 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -43,6 +43,11 @@ /* C datatypes */ #undef SIZEOF_VOIDP +#ifdef __LP64__ +#define SIZEOF_VOID_P 8 +#else +#define SIZEOF_VOID_P 4 +#endif #undef HAVE_GCC_ATOMICS #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET #undef HAVE_PTHREAD_SPINLOCK