Define universal answer of SIZEOF_VOIDP for 32/64-bit architectures.
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>
Wed, 05 Jun 2013 12:28:53 +0600
changeset 7414bc9a193c993d
parent 7413 30d42f6f2e8d
child 7415 1ca1d6864e34
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
include/SDL_config.h.in
     1.1 --- a/include/SDL_config.h.cmake	Thu Jul 11 23:05:02 2013 -0700
     1.2 +++ b/include/SDL_config.h.cmake	Wed Jun 05 12:28:53 2013 +0600
     1.3 @@ -37,7 +37,13 @@
     1.4  #cmakedefine volatile @HAVE_VOLATILE@
     1.5  
     1.6  /* C datatypes */
     1.7 -#cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
     1.8 +/* Define SIZEOF_VOIDP for 64/32 architectures */
     1.9 +#ifdef __LP64__
    1.10 +#define SIZEOF_VOIDP 8
    1.11 +#else
    1.12 +#define SIZEOF_VOIDP 4
    1.13 +#endif
    1.14 +
    1.15  #cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
    1.16  #cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
    1.17  #cmakedefine HAVE_PTHREAD_SPINLOCK @HAVE_PTHREAD_SPINLOCK@
     2.1 --- a/include/SDL_config.h.in	Thu Jul 11 23:05:02 2013 -0700
     2.2 +++ b/include/SDL_config.h.in	Wed Jun 05 12:28:53 2013 +0600
     2.3 @@ -43,6 +43,11 @@
     2.4  
     2.5  /* C datatypes */
     2.6  #undef SIZEOF_VOIDP
     2.7 +#ifdef __LP64__
     2.8 +#define SIZEOF_VOID_P 8
     2.9 +#else
    2.10 +#define SIZEOF_VOID_P 4
    2.11 +#endif
    2.12  #undef HAVE_GCC_ATOMICS
    2.13  #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
    2.14  #undef HAVE_PTHREAD_SPINLOCK