diff options
-rw-r--r-- | Modules/Compiler/ARMClang.cmake | 16 | ||||
-rw-r--r-- | Modules/Compiler/GNU.cmake | 14 | ||||
-rw-r--r-- | Modules/Compiler/Intel.cmake | 16 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmArchiveWrite.cxx | 5 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 2 | ||||
-rw-r--r-- | Utilities/cmThirdPartyChecks.cmake | 12 | ||||
-rw-r--r-- | Utilities/cmcurl/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Utilities/cmcurl/lib/curl_config.h.cmake | 21 | ||||
-rw-r--r-- | Utilities/cmlibarchive/CMakeLists.txt | 65 | ||||
-rw-r--r-- | Utilities/cmlibarchive/build/cmake/config.h.in | 267 | ||||
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_platform.h | 42 |
12 files changed, 106 insertions, 366 deletions
diff --git a/Modules/Compiler/ARMClang.cmake b/Modules/Compiler/ARMClang.cmake index 2518ac7..f0fdcd5 100644 --- a/Modules/Compiler/ARMClang.cmake +++ b/Modules/Compiler/ARMClang.cmake @@ -19,6 +19,13 @@ mark_as_advanced(CMAKE_ARMClang_LINKER) set(CMAKE_AR "${CMAKE_ARMClang_AR}" CACHE FILEPATH "The ARMClang archiver" FORCE) mark_as_advanced(CMAKE_ARMClang_AR) +if (CMAKE_LINKER MATCHES "armlink") + set(__CMAKE_ARMClang_USING_armlink TRUE) + set(CMAKE_LIBRARY_PATH_FLAG "--userlibpath=") +else() + set(__CMAKE_ARMClang_USING_armlink FALSE) +endif() + # get compiler supported cpu list function(__armclang_set_processor_list lang out_var) execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" --target=${CMAKE_${lang}_COMPILER_TARGET} -mcpu=list @@ -60,10 +67,15 @@ macro(__compiler_armclang lang) string(APPEND CMAKE_${lang}_FLAGS_INIT "-mcpu=${CMAKE_SYSTEM_PROCESSOR}") string(APPEND CMAKE_${lang}_LINK_FLAGS "--cpu=${CMAKE_SYSTEM_PROCESSOR}") - set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET> --list <TARGET_BASE>.map") + if(__CMAKE_ARMClang_USING_armlink) + set(__CMAKE_ARMClang_USING_armlink_WRAPPER "") + else() + set(__CMAKE_ARMClang_USING_armlink_WRAPPER ${CMAKE_${lang}_LINKER_WRAPPER_FLAG}) + endif() + set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET> ${__CMAKE_ARMClang_USING_armlink_WRAPPER} --list <TARGET_BASE>.map") set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> --create -cr <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> --create -cr <TARGET> <LINK_FLAGS> <OBJECTS>") - set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "--via=") + set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "${__CMAKE_ARMClang_USING_armlink_WRAPPER} --via=") set(CMAKE_${lang}_OUTPUT_EXTENSION ".o") set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1) endmacro() diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index df6d6b8..668a6a9 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -111,11 +111,13 @@ macro(__compiler_gnu lang) endif() list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp") - set(CMAKE_PCH_EXTENSION .gch) - if (NOT CMAKE_GENERATOR MATCHES "Xcode") - set(CMAKE_PCH_PROLOGUE "#pragma GCC system_header") + if(NOT "x${lang}" STREQUAL "xFortran") + set(CMAKE_PCH_EXTENSION .gch) + if (NOT CMAKE_GENERATOR MATCHES "Xcode") + set(CMAKE_PCH_PROLOGUE "#pragma GCC system_header") + endif() + set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch) + set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -include <PCH_HEADER>) + set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -x ${__pch_header_${lang}} -include <PCH_HEADER>) endif() - set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch) - set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -include <PCH_HEADER>) - set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -x ${__pch_header_${lang}} -include <PCH_HEADER>) endmacro() diff --git a/Modules/Compiler/Intel.cmake b/Modules/Compiler/Intel.cmake index 63a20af..9a760c8 100644 --- a/Modules/Compiler/Intel.cmake +++ b/Modules/Compiler/Intel.cmake @@ -33,12 +33,14 @@ else() endif() list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-QdM" "-P" "-Za" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp") - # Precompile Headers - set(CMAKE_PCH_EXTENSION .pchi) - set(CMAKE_LINK_PCH ON) - set(CMAKE_PCH_EPILOGUE "#pragma hdrstop") - set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch) - set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Wno-pch-messages -pch-use <PCH_FILE> -include <PCH_HEADER>) - set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Wno-pch-messages -pch-create <PCH_FILE> -include <PCH_HEADER>) + if(NOT "x${lang}" STREQUAL "xFortran") + # Precompile Headers + set(CMAKE_PCH_EXTENSION .pchi) + set(CMAKE_LINK_PCH ON) + set(CMAKE_PCH_EPILOGUE "#pragma hdrstop") + set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch) + set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Wno-pch-messages -pch-use <PCH_FILE> -include <PCH_HEADER>) + set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Wno-pch-messages -pch-create <PCH_FILE> -include <PCH_HEADER>) + endif() endmacro() endif() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9eaf22c..72d71e6 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 17) -set(CMake_VERSION_PATCH 20200602) +set(CMake_VERSION_PATCH 20200603) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index 78bb6e0..addfbff 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -282,7 +282,12 @@ bool cmArchiveWrite::AddFile(const char* file, size_t skip, const char* prefix) time_t epochTime; iss >> epochTime; if (iss.eof() && !iss.fail()) { + // Set all of the file times to the epoch time to handle archive + // formats that include creation/access time. archive_entry_set_mtime(e, epochTime, 0); + archive_entry_set_atime(e, epochTime, 0); + archive_entry_set_ctime(e, epochTime, 0); + archive_entry_set_birthtime(e, epochTime, 0); } } } diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 0932d06..c688da2 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -167,7 +167,7 @@ void cmGlobalVisualStudioGenerator::WriteSLNHeader(std::ostream& fout) if (this->ExpressEdition) { fout << "# Visual Studio Express 16 for Windows Desktop\n"; } else { - fout << "# Visual Studio 16\n"; + fout << "# Visual Studio Version 16\n"; } break; } diff --git a/Utilities/cmThirdPartyChecks.cmake b/Utilities/cmThirdPartyChecks.cmake index e3ce469..0b57940 100644 --- a/Utilities/cmThirdPartyChecks.cmake +++ b/Utilities/cmThirdPartyChecks.cmake @@ -260,18 +260,6 @@ if(WIN32) # curl and expat: stdlib.h, stdarg.h, string.h, float.h set(STDC_HEADERS 1) - # FIXME: Teach libarchive to use #if instead of configure-time checks. - set(HAVE_DECL_INT32_MAX 1) - set(HAVE_DECL_INT32_MIN 1) - set(HAVE_DECL_INT64_MAX 1) - set(HAVE_DECL_INT64_MIN 1) - set(HAVE_DECL_INTMAX_MAX 1) - set(HAVE_DECL_INTMAX_MIN 1) - set(HAVE_DECL_SIZE_MAX 1) - set(HAVE_DECL_UINT32_MAX 1) - set(HAVE_DECL_UINT64_MAX 1) - set(HAVE_DECL_UINTMAX_MAX 1) - # libarchive looks for external hash implementations. set(ARCHIVE_CRYPTO_MD5_LIBC 0) set(ARCHIVE_CRYPTO_MD5_LIBMD 0) diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index c90e768..90d104f 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -975,18 +975,8 @@ check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H) check_type_size(size_t SIZEOF_SIZE_T) check_type_size(ssize_t SIZEOF_SSIZE_T) -check_type_size("long long" SIZEOF_LONG_LONG) -check_type_size("long" SIZEOF_LONG) -check_type_size("short" SIZEOF_SHORT) -check_type_size("int" SIZEOF_INT) -check_type_size("__int64" SIZEOF___INT64) check_type_size("time_t" SIZEOF_TIME_T) -if(HAVE_SIZEOF_LONG_LONG) - set(HAVE_LONGLONG 1) - set(HAVE_LL 1) -endif() - find_file(RANDOM_FILE urandom /dev) mark_as_advanced(RANDOM_FILE) diff --git a/Utilities/cmcurl/lib/curl_config.h.cmake b/Utilities/cmcurl/lib/curl_config.h.cmake index ab8f225..aa52b6a 100644 --- a/Utilities/cmcurl/lib/curl_config.h.cmake +++ b/Utilities/cmcurl/lib/curl_config.h.cmake @@ -1,5 +1,7 @@ /* lib/curl_config.h.in. Generated somehow by cmake. */ +#include <cm3p/kwiml/abi.h> + /* when building libcurl itself */ #cmakedefine BUILDING_LIBCURL 1 @@ -404,9 +406,6 @@ /* if brotli is available */ #cmakedefine HAVE_BROTLI 1 -/* if your compiler supports LL */ -#cmakedefine HAVE_LL 1 - /* Define to 1 if you have the <locale.h> header file. */ #cmakedefine HAVE_LOCALE_H 1 @@ -414,7 +413,9 @@ #cmakedefine HAVE_LOCALTIME_R 1 /* Define to 1 if the compiler supports the 'long long' data type. */ -#cmakedefine HAVE_LONGLONG 1 +#if KWIML_ABI_SIZEOF_LONG_LONG +# define HAVE_LONGLONG 1 +#endif /* Define to 1 if you have the malloc.h header file. */ #cmakedefine HAVE_MALLOC_H 1 @@ -883,19 +884,21 @@ */ /* The size of `int', as computed by sizeof. */ -${SIZEOF_INT_CODE} +#define SIZEOF_INT KWIML_ABI_SIZEOF_INT /* The size of `short', as computed by sizeof. */ -${SIZEOF_SHORT_CODE} +#define SIZEOF_SHORT KWIML_ABI_SIZEOF_SHORT /* The size of `long', as computed by sizeof. */ -${SIZEOF_LONG_CODE} +#define SIZEOF_LONG KWIML_ABI_SIZEOF_LONG /* The size of `long long', as computed by sizeof. */ -${SIZEOF_LONG_LONG_CODE} +#define SIZEOF_LONG_LONG KWIML_ABI_SIZEOF_LONG_LONG /* The size of `__int64', as computed by sizeof. */ -${SIZEOF___INT64_CODE} +#if KWIML_ABI_SIZEOF___INT64 +# define SIZEOF___INT64 KWIML_ABI_SIZEOF___INT64 +#endif /* The size of `off_t', as computed by sizeof. */ ${SIZEOF_OFF_T_CODE} diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt index d4729b5..bfcaf30 100644 --- a/Utilities/cmlibarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/CMakeLists.txt @@ -690,7 +690,6 @@ int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS) LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H) LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H) -LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H) LA_CHECK_INCLUDE_FILE("langinfo.h" HAVE_LANGINFO_H) LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H) @@ -716,7 +715,6 @@ LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H) LA_CHECK_INCLUDE_FILE("signal.h" HAVE_SIGNAL_H) LA_CHECK_INCLUDE_FILE("spawn.h" HAVE_SPAWN_H) LA_CHECK_INCLUDE_FILE("stdarg.h" HAVE_STDARG_H) -LA_CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) LA_CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H) LA_CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H) LA_CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H) @@ -1488,27 +1486,9 @@ ENDIF(HAVE_STRERROR_R) # # Check defines # -SET(headers "limits.h") -IF(HAVE_STDINT_H) - LIST(APPEND headers "stdint.h") -ENDIF(HAVE_STDINT_H) -IF(HAVE_INTTYPES_H) - LIST(APPEND headers "inttypes.h") -ENDIF(HAVE_INTTYPES_H) CHECK_SYMBOL_EXISTS(EFTYPE "errno.h" HAVE_EFTYPE) CHECK_SYMBOL_EXISTS(EILSEQ "errno.h" HAVE_EILSEQ) CHECK_SYMBOL_EXISTS(D_MD_ORDER "langinfo.h" HAVE_D_MD_ORDER) -CHECK_SYMBOL_EXISTS(INT32_MAX "${headers}" HAVE_DECL_INT32_MAX) -CHECK_SYMBOL_EXISTS(INT32_MIN "${headers}" HAVE_DECL_INT32_MIN) -CHECK_SYMBOL_EXISTS(INT64_MAX "${headers}" HAVE_DECL_INT64_MAX) -CHECK_SYMBOL_EXISTS(INT64_MIN "${headers}" HAVE_DECL_INT64_MIN) -CHECK_SYMBOL_EXISTS(INTMAX_MAX "${headers}" HAVE_DECL_INTMAX_MAX) -CHECK_SYMBOL_EXISTS(INTMAX_MIN "${headers}" HAVE_DECL_INTMAX_MIN) -CHECK_SYMBOL_EXISTS(UINT32_MAX "${headers}" HAVE_DECL_UINT32_MAX) -CHECK_SYMBOL_EXISTS(UINT64_MAX "${headers}" HAVE_DECL_UINT64_MAX) -CHECK_SYMBOL_EXISTS(UINTMAX_MAX "${headers}" HAVE_DECL_UINTMAX_MAX) -CHECK_SYMBOL_EXISTS(SIZE_MAX "${headers}" HAVE_DECL_SIZE_MAX) -CHECK_SYMBOL_EXISTS(SSIZE_MAX "limits.h" HAVE_DECL_SSIZE_MAX) # # Check struct members @@ -1557,33 +1537,6 @@ ENDIF() CHECK_STRUCT_HAS_MEMBER("struct tm" tm_sec "sys/types.h;sys/time.h;time.h" TIME_WITH_SYS_TIME) -# -# Check for integer types -# -# -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(uint8_t UINT8_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) @@ -1659,24 +1612,6 @@ IF(NOT HAVE_PID_T) ENDIF(WIN32) ENDIF(NOT HAVE_PID_T) # -CHECK_TYPE_SIZE(intptr_t INTPTR_T) -IF(NOT HAVE_INTPTR_T) - IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) - SET(intptr_t "int64_t") - ELSE() - SET(intptr_t "int32_t") - ENDIF() -ENDIF(NOT HAVE_INTPTR_T) -# -CHECK_TYPE_SIZE(uintptr_t UINTPTR_T) -IF(NOT HAVE_UINTPTR_T) - IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) - SET(uintptr_t "uint64_t") - ELSE() - SET(uintptr_t "uint32_t") - ENDIF() -ENDIF(NOT HAVE_UINTPTR_T) -# CHECK_TYPE_SIZE(wchar_t SIZEOF_WCHAR_T) IF(HAVE_SIZEOF_WCHAR_T) SET(HAVE_WCHAR_T 1) diff --git a/Utilities/cmlibarchive/build/cmake/config.h.in b/Utilities/cmlibarchive/build/cmake/config.h.in index bcda4c3..e889781 100644 --- a/Utilities/cmlibarchive/build/cmake/config.h.in +++ b/Utilities/cmlibarchive/build/cmake/config.h.in @@ -7,178 +7,6 @@ * Ensure we have C99-style int64_t, etc, all defined. */ -/* First, we need to know if the system has already defined them. */ -#cmakedefine HAVE_INT16_T -#cmakedefine HAVE_INT32_T -#cmakedefine HAVE_INT64_T -#cmakedefine HAVE_INTMAX_T - -#cmakedefine HAVE_UINT8_T -#cmakedefine HAVE_UINT16_T -#cmakedefine HAVE_UINT32_T -#cmakedefine HAVE_UINT64_T -#cmakedefine HAVE_UINTMAX_T - -/* We might have the types we want under other spellings. */ -#cmakedefine HAVE___INT64 -#cmakedefine HAVE_U_INT64_T -#cmakedefine HAVE_UNSIGNED___INT64 - -/* The sizes of various standard integer types. */ -@SIZE_OF_SHORT_CODE@ -@SIZE_OF_INT_CODE@ -@SIZE_OF_LONG_CODE@ -@SIZE_OF_LONG_LONG_CODE@ -@SIZE_OF_UNSIGNED_SHORT_CODE@ -@SIZE_OF_UNSIGNED_CODE@ -@SIZE_OF_UNSIGNED_LONG_CODE@ -@SIZE_OF_UNSIGNED_LONG_LONG_CODE@ - -/* - * If we lack int64_t, define it to the first of __int64, int, long, and long long - * that exists and is the right size. - */ -#if !defined(HAVE_INT64_T) && defined(HAVE___INT64) -typedef __int64 int64_t; -#define HAVE_INT64_T -#endif - -#if !defined(HAVE_INT64_T) && SIZE_OF_INT == 8 -typedef int int64_t; -#define HAVE_INT64_T -#endif - -#if !defined(HAVE_INT64_T) && SIZE_OF_LONG == 8 -typedef long int64_t; -#define HAVE_INT64_T -#endif - -#if !defined(HAVE_INT64_T) && SIZE_OF_LONG_LONG == 8 -typedef long long int64_t; -#define HAVE_INT64_T -#endif - -#if !defined(HAVE_INT64_T) -#error No 64-bit integer type was found. -#endif - -/* - * Similarly for int32_t - */ -#if !defined(HAVE_INT32_T) && SIZE_OF_INT == 4 -typedef int int32_t; -#define HAVE_INT32_T -#endif - -#if !defined(HAVE_INT32_T) && SIZE_OF_LONG == 4 -typedef long int32_t; -#define HAVE_INT32_T -#endif - -#if !defined(HAVE_INT32_T) -#error No 32-bit integer type was found. -#endif - -/* - * Similarly for int16_t - */ -#if !defined(HAVE_INT16_T) && SIZE_OF_INT == 2 -typedef int int16_t; -#define HAVE_INT16_T -#endif - -#if !defined(HAVE_INT16_T) && SIZE_OF_SHORT == 2 -typedef short int16_t; -#define HAVE_INT16_T -#endif - -#if !defined(HAVE_INT16_T) -#error No 16-bit integer type was found. -#endif - -/* - * Similarly for uint64_t - */ -#if !defined(HAVE_UINT64_T) && defined(HAVE_UNSIGNED___INT64) -typedef unsigned __int64 uint64_t; -#define HAVE_UINT64_T -#endif - -#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED == 8 -typedef unsigned uint64_t; -#define HAVE_UINT64_T -#endif - -#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG == 8 -typedef unsigned long uint64_t; -#define HAVE_UINT64_T -#endif - -#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG_LONG == 8 -typedef unsigned long long uint64_t; -#define HAVE_UINT64_T -#endif - -#if !defined(HAVE_UINT64_T) -#error No 64-bit unsigned integer type was found. -#endif - - -/* - * Similarly for uint32_t - */ -#if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED == 4 -typedef unsigned uint32_t; -#define HAVE_UINT32_T -#endif - -#if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED_LONG == 4 -typedef unsigned long uint32_t; -#define HAVE_UINT32_T -#endif - -#if !defined(HAVE_UINT32_T) -#error No 32-bit unsigned integer type was found. -#endif - -/* - * Similarly for uint16_t - */ -#if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED == 2 -typedef unsigned uint16_t; -#define HAVE_UINT16_T -#endif - -#if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED_SHORT == 2 -typedef unsigned short uint16_t; -#define HAVE_UINT16_T -#endif - -#if !defined(HAVE_UINT16_T) -#error No 16-bit unsigned integer type was found. -#endif - -/* - * Similarly for uint8_t - */ -#if !defined(HAVE_UINT8_T) -typedef unsigned char uint8_t; -#define HAVE_UINT8_T -#endif - -#if !defined(HAVE_UINT16_T) -#error No 8-bit unsigned integer type was found. -#endif - -/* Define intmax_t and uintmax_t if they are not already defined. */ -#if !defined(HAVE_INTMAX_T) -typedef int64_t intmax_t; -#endif - -#if !defined(HAVE_UINTMAX_T) -typedef uint64_t uintmax_t; -#endif - /* Define ZLIB_WINAPI if zlib was built on Visual Studio. */ #cmakedefine ZLIB_WINAPI 1 @@ -426,58 +254,14 @@ typedef uint64_t uintmax_t; don't. */ #cmakedefine HAVE_DECL_ACL_USER 1 -/* Define to 1 if you have the declaration of `INT32_MAX', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_INT32_MAX 1 - -/* Define to 1 if you have the declaration of `INT32_MIN', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_INT32_MIN 1 - -/* Define to 1 if you have the declaration of `INT64_MAX', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_INT64_MAX 1 - -/* Define to 1 if you have the declaration of `INT64_MIN', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_INT64_MIN 1 - -/* Define to 1 if you have the declaration of `INTMAX_MAX', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_INTMAX_MAX 1 - -/* Define to 1 if you have the declaration of `INTMAX_MIN', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_INTMAX_MIN 1 - /* Define to 1 if you have the declaration of `SETACL', and to 0 if you don't. */ #cmakedefine HAVE_DECL_SETACL 1 -/* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_SIZE_MAX 1 - -/* Define to 1 if you have the declaration of `SSIZE_MAX', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_SSIZE_MAX 1 - /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #cmakedefine HAVE_DECL_STRERROR_R 1 -/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_UINT32_MAX 1 - -/* Define to 1 if you have the declaration of `UINT64_MAX', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_UINT64_MAX 1 - -/* Define to 1 if you have the declaration of `UINTMAX_MAX', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_UINTMAX_MAX 1 - /* Define to 1 if you have the declaration of `XATTR_NOFOLLOW', and to 0 if you don't. */ #cmakedefine HAVE_DECL_XATTR_NOFOLLOW 1 @@ -647,9 +431,6 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the <iconv.h> header file. */ #cmakedefine HAVE_ICONV_H 1 -/* Define to 1 if you have the <inttypes.h> header file. */ -#cmakedefine HAVE_INTTYPES_H 1 - /* Define to 1 if you have the <io.h> header file. */ #cmakedefine HAVE_IO_H 1 @@ -955,9 +736,6 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the <stdarg.h> header file. */ #cmakedefine HAVE_STDARG_H 1 -/* Define to 1 if you have the <stdint.h> header file. */ -#cmakedefine HAVE_STDINT_H 1 - /* Define to 1 if you have the <stdlib.h> header file. */ #cmakedefine HAVE_STDLIB_H 1 @@ -1337,8 +1115,45 @@ typedef uint64_t uintmax_t; /* Define to `int' if <sys/types.h> doesn't define. */ #cmakedefine uid_t ${uid_t} -/* Define to `int' if <sys/types.h> does not define. */ -#cmakedefine intptr_t ${intptr_t} +#include <cm3p/kwiml/int.h> -/* Define to `unsigned int' if <sys/types.h> does not define. */ -#cmakedefine uintptr_t ${uintptr_t} +#ifndef KWIML_INT_HAVE_INT64_T +# define int64_t KWIML_INT_int64_t +#endif +#ifndef KWIML_INT_HAVE_INT32_T +# define int32_t KWIML_INT_int32_t +#endif +#ifndef KWIML_INT_HAVE_INT16_T +# define int16_t KWIML_INT_int16_t +#endif +#ifndef KWIML_INT_HAVE_INT8_T +# define int8_t KWIML_INT_int8_t +#endif +#ifndef KWIML_INT_HAVE_INTPTR_T +# define intptr_t KWIML_INT_intptr_t +#endif +#ifndef KWIML_INT_HAVE_UINT64_T +# define uint64_t KWIML_INT_uint64_t +#endif +#ifndef KWIML_INT_HAVE_UINT32_T +# define uint32_t KWIML_INT_uint32_t +#endif +#ifndef KWIML_INT_HAVE_UINT16_T +# define uint16_t KWIML_INT_uint16_t +#endif +#ifndef KWIML_INT_HAVE_UINT8_T +# define uint8_t KWIML_INT_uint8_t +#endif +#ifndef KWIML_INT_HAVE_UINTPTR_T +# define uintptr_t KWIML_INT_uintptr_t +#endif + +/* Define to 1 if you have the <stdint.h> header file. */ +#ifdef KWIML_INT_HAVE_STDINT_H +# define HAVE_STDINT_H 1 +#endif + +/* Define to 1 if you have the <inttypes.h> header file. */ +#ifdef KWIML_INT_HAVE_INTTYPES_H +# define HAVE_INTTYPES_H 1 +#endif diff --git a/Utilities/cmlibarchive/libarchive/archive_platform.h b/Utilities/cmlibarchive/libarchive/archive_platform.h index 90db31f..3273930 100644 --- a/Utilities/cmlibarchive/libarchive/archive_platform.h +++ b/Utilities/cmlibarchive/libarchive/archive_platform.h @@ -107,56 +107,44 @@ /* Borland warns about its own constants! */ #if defined(__BORLANDC__) -# if HAVE_DECL_UINT64_MAX -# undef UINT64_MAX -# undef HAVE_DECL_UINT64_MAX -# endif -# if HAVE_DECL_UINT64_MIN -# undef UINT64_MIN -# undef HAVE_DECL_UINT64_MIN -# endif -# if HAVE_DECL_INT64_MAX -# undef INT64_MAX -# undef HAVE_DECL_INT64_MAX -# endif -# if HAVE_DECL_INT64_MIN -# undef INT64_MIN -# undef HAVE_DECL_INT64_MIN -# endif +# undef UINT64_MAX +# undef UINT64_MIN +# undef INT64_MAX +# undef INT64_MIN #endif /* Some platforms lack the standard *_MAX definitions. */ -#if !HAVE_DECL_SIZE_MAX +#ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif -#if !HAVE_DECL_SSIZE_MAX +#ifndef SSIZE_MAX #define SSIZE_MAX ((ssize_t)(SIZE_MAX >> 1)) #endif -#if !HAVE_DECL_UINT32_MAX +#ifndef UINT32_MAX #define UINT32_MAX (~(uint32_t)0) #endif -#if !HAVE_DECL_INT32_MAX +#ifndef INT32_MAX #define INT32_MAX ((int32_t)(UINT32_MAX >> 1)) #endif -#if !HAVE_DECL_INT32_MIN +#ifndef INT32_MIN #define INT32_MIN ((int32_t)(~INT32_MAX)) #endif -#if !HAVE_DECL_UINT64_MAX +#ifndef UINT64_MAX #define UINT64_MAX (~(uint64_t)0) #endif -#if !HAVE_DECL_INT64_MAX +#ifndef INT64_MAX #define INT64_MAX ((int64_t)(UINT64_MAX >> 1)) #endif -#if !HAVE_DECL_INT64_MIN +#ifndef INT64_MIN #define INT64_MIN ((int64_t)(~INT64_MAX)) #endif -#if !HAVE_DECL_UINTMAX_MAX +#ifndef UINTMAX_MAX #define UINTMAX_MAX (~(uintmax_t)0) #endif -#if !HAVE_DECL_INTMAX_MAX +#ifndef INTMAX_MAX #define INTMAX_MAX ((intmax_t)(UINTMAX_MAX >> 1)) #endif -#if !HAVE_DECL_INTMAX_MIN +#ifndef INTMAX_MIN #define INTMAX_MIN ((intmax_t)(~INTMAX_MAX)) #endif |