diff options
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmcurl/CMake/CheckTypeSize.c.in | 2 | ||||
-rw-r--r-- | Utilities/cmcurl/CMake/CheckTypeSize.cmake | 20 | ||||
-rw-r--r-- | Utilities/cmcurl/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Utilities/cmcurl/Platforms/WindowsCache.cmake | 1 | ||||
-rw-r--r-- | Utilities/cmcurl/timeval.h | 2 | ||||
-rw-r--r-- | Utilities/cmtar/handle.c | 2 | ||||
-rw-r--r-- | Utilities/cmtar/libtar.c | 7 |
7 files changed, 20 insertions, 15 deletions
diff --git a/Utilities/cmcurl/CMake/CheckTypeSize.c.in b/Utilities/cmcurl/CMake/CheckTypeSize.c.in index 822d9c5..8c9a016 100644 --- a/Utilities/cmcurl/CMake/CheckTypeSize.c.in +++ b/Utilities/cmcurl/CMake/CheckTypeSize.c.in @@ -1,7 +1,7 @@ +#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@ #ifdef CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_PREINCLUDE@ - #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif /* HAVE_SYS_TYPES_H */ diff --git a/Utilities/cmcurl/CMake/CheckTypeSize.cmake b/Utilities/cmcurl/CMake/CheckTypeSize.cmake index 26c822d..be76154 100644 --- a/Utilities/cmcurl/CMake/CheckTypeSize.cmake +++ b/Utilities/cmcurl/CMake/CheckTypeSize.cmake @@ -1,28 +1,28 @@ -# +# - Check sizeof a type +# CHECK_TYPE_SIZE(TYPE VARIABLE) # Check if the type exists and determine size of type. if the type # exists, the size will be stored to the variable. # -# CHECK_TYPE_SIZE - macro which checks the size of type -# VARIABLE - variable to store size if the type exists. -# HAVE_${VARIABLE} - does the variable exists or not -# +# VARIABLE - variable to store size if the type exists. +# HAVE_${VARIABLE} - does the variable exists or not MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1) IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") + SET(CHECK_TYPE_SIZE_TYPE "${TYPE}") SET(MACRO_CHECK_TYPE_SIZE_FLAGS - "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}") + "${CMAKE_REQUIRED_FLAGS}") FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H) IF("${def}") SET(MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}") ENDIF("${def}") ENDFOREACH(def) - SET(CHECK_TYPE_SIZE_PREMAIN) + SET(CHECK_TYPE_SIZE_PREINCLUDE) FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES}) SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n") ENDFOREACH(def) - CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in" + CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSize.c.in" "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY) FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" CHECK_TYPE_SIZE_FILE_CONTENT) @@ -39,11 +39,11 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) OUTPUT_VARIABLE OUTPUT) IF(HAVE_${VARIABLE}) MESSAGE(STATUS "Check size of ${TYPE} - done") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n") ELSE(HAVE_${VARIABLE}) MESSAGE(STATUS "Check size of ${TYPE} - failed") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n") ENDIF(HAVE_${VARIABLE}) ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index f2367e4..b615242 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -252,7 +252,6 @@ CHECK_INCLUDE_FILE_CONCAT("setjmp.h" HAVE_SETJMP_H) CHECK_INCLUDE_FILE_CONCAT("signal.h" HAVE_SIGNAL_H) CHECK_INCLUDE_FILE_CONCAT("sys/ioctl.h" HAVE_SYS_IOCTL_H) 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) diff --git a/Utilities/cmcurl/Platforms/WindowsCache.cmake b/Utilities/cmcurl/Platforms/WindowsCache.cmake index 1a84b37..d660c0a 100644 --- a/Utilities/cmcurl/Platforms/WindowsCache.cmake +++ b/Utilities/cmcurl/Platforms/WindowsCache.cmake @@ -51,7 +51,6 @@ IF(NOT UNIX) SET(HAVE_ZLIB_H 0) SET(HAVE_SIZEOF_LONG_DOUBLE 1) - SET(HAVE_SIZEOF_SSIZE_T 0) SET(SIZEOF_LONG_DOUBLE 8) SET(HAVE_SOCKET 1) diff --git a/Utilities/cmcurl/timeval.h b/Utilities/cmcurl/timeval.h index 67b885a..efe377e 100644 --- a/Utilities/cmcurl/timeval.h +++ b/Utilities/cmcurl/timeval.h @@ -37,7 +37,7 @@ #endif #ifndef HAVE_GETTIMEOFDAY -#if !defined(_WINSOCKAPI_) && !defined(__MINGW32__) && !defined(_AMIGASF) && \ +#if !defined(_WINSOCKAPI_) && !defined(__WATCOMC__) && !defined(__MINGW32__) && !defined(_AMIGASF) && \ !defined(__LCC__) struct timeval { long tv_sec; diff --git a/Utilities/cmtar/handle.c b/Utilities/cmtar/handle.c index 4b9a169..de324cb 100644 --- a/Utilities/cmtar/handle.c +++ b/Utilities/cmtar/handle.c @@ -24,7 +24,7 @@ # include <stdlib.h> #endif -#ifdef _MSC_VER +#if defined ( _MSC_VER) || defined(__WATCOMC__) #include <io.h> //Yogi: hack. this should work on windows where there is no O_ACCMODE defined #ifndef O_ACCMODE diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index 9131512..fdeccf2 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -75,6 +75,13 @@ struct gzStruct gzFile* GZFile; }; struct gzStruct GZStruct; +#if defined ( _MSC_VER) || defined(__WATCOMC__) +#include <io.h> +//Yogi: hack. this should work on windows where there is no O_ACCMODE defined +#ifndef O_ACCMODE +# define O_ACCMODE 0x0003 +#endif +#endif int libtar_gzopen(void* call_data, const char *pathname, int oflags, mode_t mode) { |