Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Define universal answer of SIZEOF_VOIDP for 32/64-bit architectures.
Browse files Browse the repository at this point in the history
This commit makes SDL_config.h universal, so it can be used with mixed
32 and 64 enviroment simultaneously.
  • Loading branch information
winterheart committed Jun 5, 2013
1 parent 6e900c2 commit 8bbff71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/SDL_config.h.cmake
Expand Up @@ -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@
Expand Down
5 changes: 5 additions & 0 deletions include/SDL_config.h.in
Expand Up @@ -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
Expand Down

0 comments on commit 8bbff71

Please sign in to comment.