diff options
-rw-r--r-- | ConfigureChecks.cmake | 3 | ||||
-rw-r--r-- | config.h.cmake | 4 | ||||
-rw-r--r-- | include/cmocka.h | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index fe8da35..028774f 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -70,6 +70,9 @@ if (HAVE_TIME_H) check_struct_has_member("struct timespec" tv_sec "time.h" HAVE_STRUCT_TIMESPEC) endif (HAVE_TIME_H) +# TYPES +check_type_size(uintptr_t UINTPTR_T) + # FUNCTIONS check_function_exists(calloc HAVE_CALLOC) check_function_exists(exit HAVE_EXIT) diff --git a/config.h.cmake b/config.h.cmake index f8d79da..55fc69f 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -75,6 +75,10 @@ #cmakedefine HAVE_STRUCT_TIMESPEC 1 +/***************************** TYPES *****************************/ + +#cmakedefine HAVE_UINTPTR_T 1 + /*************************** FUNCTIONS ***************************/ /* Define to 1 if you have the `calloc' function. */ diff --git a/include/cmocka.h b/include/cmocka.h index 3e923dd..0aa557e 100644 --- a/include/cmocka.h +++ b/include/cmocka.h @@ -120,7 +120,7 @@ typedef uintmax_t LargestIntegralType; ((LargestIntegralType)(value)) /* Smallest integral type capable of holding a pointer. */ -#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) +#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) && !defined(HAVE_UINTPTR_T) # if defined(_WIN32) /* WIN32 is an ILP32 platform */ typedef unsigned int uintptr_t; |