diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 65 |
1 files changed, 21 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 98927909..f755ff10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -637,13 +637,29 @@ CHECK_STRUCT_MEMBER("struct tm" tm_sec # # Check for integer types # -# XXX There must be a way to make this simpler <sigh> XXXX # -CHECK_TYPE_SIZE("long long int" LONG_LONG_INT) -CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) -CHECK_TYPE_SIZE("unsigned long long int" UNSIGNED_LONG_LONG_INT) +CHECK_TYPE_SIZE("short" SIZE_OF_SHORT) +CHECK_TYPE_SIZE("int" SIZE_OF_INT) +CHECK_TYPE_SIZE("long" SIZE_OF_LONG) +CHECK_TYPE_SIZE("long long" SIZE_OF_LONG_LONG) + +CHECK_TYPE_SIZE("unsigned short" SIZE_OF_UNSIGNED_SHORT) +CHECK_TYPE_SIZE("unsigned" SIZE_OF_UNSIGNED) +CHECK_TYPE_SIZE("unsigned long" SIZE_OF_UNSIGNED_LONG) +CHECK_TYPE_SIZE("unsigned long long" SIZE_OF_UNSIGNED_LONG_LONG) + +CHECK_TYPE_SIZE("__int64" __INT64) +CHECK_TYPE_SIZE("unsigned __int64" UNSIGNED___INT64) + +CHECK_TYPE_SIZE(int16_t INT16_T) +CHECK_TYPE_SIZE(int32_t INT32_T) +CHECK_TYPE_SIZE(int64_t INT64_T) +CHECK_TYPE_SIZE(intmax_t INTMAX_T) +CHECK_TYPE_SIZE(uint16_t UINT16_T) +CHECK_TYPE_SIZE(uint32_t UINT32_T) +CHECK_TYPE_SIZE(uint64_t UINT64_T) +CHECK_TYPE_SIZE(uintmax_t UINTMAX_T) -# CHECK_TYPE_SIZE(dev_t DEV_T) IF(NOT HAVE_DEV_T) IF(MSVC) @@ -669,23 +685,6 @@ IF(NOT HAVE_ID_T) ENDIF(WIN32) ENDIF(NOT HAVE_ID_T) # -CHECK_TYPE_SIZE(int32_t INT32_T) -IF(NOT HAVE_INT32_T) - SET(int32_t "int") -ENDIF(NOT HAVE_INT32_T) -# -CHECK_TYPE_SIZE(int64_t INT64_T) -IF(NOT HAVE_INT64_T) - IF(WIN32) - SET(int64_t __int64) - ENDIF(WIN32) -ENDIF(NOT HAVE_INT64_T) -# -CHECK_TYPE_SIZE(intmax_t INTMAX_T) -IF(NOT HAVE_INTMAX_T) - SET(intmax_t "int64_t") -ENDIF(NOT HAVE_INTMAX_T) -# CHECK_TYPE_SIZE(mode_t MODE_T) IF(NOT HAVE_MODE_T) IF(WIN32) @@ -736,28 +735,6 @@ IF(NOT HAVE_PID_T) ENDIF(WIN32) ENDIF(NOT HAVE_PID_T) # -CHECK_TYPE_SIZE(uint16_t UINT16_T) -IF(NOT HAVE_UINT16_T) - SET(uint16_t "unsigned short") -ENDIF(NOT HAVE_UINT16_T) -# -CHECK_TYPE_SIZE(uint32_t UINT32_T) -IF(NOT HAVE_UINT32_T) - SET(uint32_t "unsigned int") -ENDIF(NOT HAVE_UINT32_T) -# -CHECK_TYPE_SIZE(uint64_t UINT64_T) -IF(NOT HAVE_UINT64_T) - IF(WIN32) - SET(uint64_t "unsigned __int64") - ENDIF(WIN32) -ENDIF(NOT HAVE_UINT64_T) -# -CHECK_TYPE_SIZE(uintmax_t UINTMAX_T) -IF(NOT HAVE_UINTMAX_T) - SET(uintmax_t "uint64_t") -ENDIF(NOT HAVE_UINTMAX_T) -# CHECK_TYPE_SIZE(intptr_t INTPTR_T) IF(NOT HAVE_INTPTR_T) IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) |