diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-05 14:00:36 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-05 14:00:36 (GMT) |
commit | b847a6ac6282c27b220177a8ec105044a084b884 (patch) | |
tree | 1d3ee92c99550caec0992d7dea43fd5a29cce44e /Source/CTest/Curl | |
parent | 609801fe67c95f9959468df8316a8f4a26943842 (diff) | |
download | CMake-b847a6ac6282c27b220177a8ec105044a084b884.zip CMake-b847a6ac6282c27b220177a8ec105044a084b884.tar.gz CMake-b847a6ac6282c27b220177a8ec105044a084b884.tar.bz2 |
ERR: Fix Windows build
Diffstat (limited to 'Source/CTest/Curl')
-rw-r--r-- | Source/CTest/Curl/CMake/CheckTypeSize.cmake | 2 | ||||
-rw-r--r-- | Source/CTest/Curl/CMake/CurlTests.c | 31 | ||||
-rw-r--r-- | Source/CTest/Curl/CMakeLists.txt | 12 |
3 files changed, 42 insertions, 3 deletions
diff --git a/Source/CTest/Curl/CMake/CheckTypeSize.cmake b/Source/CTest/Curl/CMake/CheckTypeSize.cmake index c9a71f0..ddc990a 100644 --- a/Source/CTest/Curl/CMake/CheckTypeSize.cmake +++ b/Source/CTest/Curl/CMake/CheckTypeSize.cmake @@ -22,7 +22,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES}) SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n") ENDFOREACH(def) - CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSize.c.in" + CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in" "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY) FILE(READ "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" CHECK_TYPE_SIZE_FILE_CONTENT) diff --git a/Source/CTest/Curl/CMake/CurlTests.c b/Source/CTest/Curl/CMake/CurlTests.c index a637b38..d8a12f6 100644 --- a/Source/CTest/Curl/CMake/CurlTests.c +++ b/Source/CTest/Curl/CMake/CurlTests.c @@ -427,3 +427,34 @@ void main(void) { ? 1 : -1]; int main () { ; return 0; } #endif +#ifdef HAVE_IOCTLSOCKET +#include <windows.h> + +int +main () +{ + +/* ioctlsocket source code */ + int socket; + unsigned long flags = ioctlsocket(socket, FIONBIO, &flags); + + ; + return 0; +} + +#endif +#ifdef HAVE_IOCTLSOCKET_CASE +#include <windows.h> + +int +main () +{ + +/* IoctlSocket source code */ + int socket; + int flags = IoctlSocket(socket, FIONBIO, (long)1); + + ; + return 0; +} +#endif diff --git a/Source/CTest/Curl/CMakeLists.txt b/Source/CTest/Curl/CMakeLists.txt index 61a174d..5156960 100644 --- a/Source/CTest/Curl/CMakeLists.txt +++ b/Source/CTest/Curl/CMakeLists.txt @@ -78,7 +78,6 @@ SET(libCurl_SRCS ssluse.c strequal.c strerror.c - strtok.c strtoofft.c telnet.c timeval.c @@ -263,6 +262,10 @@ CHECK_SYMBOL_EXISTS(uname "${CURL_INCLUDES}" HAVE_UNAME) CHECK_SYMBOL_EXISTS(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP) CHECK_SYMBOL_EXISTS(stricmp "${CURL_INCLUDES}" HAVE_STRICMP) CHECK_SYMBOL_EXISTS(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI) +CHECK_SYMBOL_EXISTS(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI) +IF(NOT HAVE_STRNCMPI) + SET(HAVE_STRCMPI) +ENDIF(NOT HAVE_STRNCMPI) CHECK_SYMBOL_EXISTS(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR) CHECK_SYMBOL_EXISTS(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY) CHECK_SYMBOL_EXISTS(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR) @@ -361,7 +364,9 @@ ENDMACRO(CURL_INTERNAL_TEST) FOREACH(CURL_TEST TIME_WITH_SYS_TIME HAVE_O_NONBLOCK - HAVE_GETHOSTBYADDR_R_5 + HAVE_IOCTLSOCKET + HAVE_IOCTLSOCKET_CASE + HAVE_O_NONBLOCKHAVE_GETHOSTBYADDR_R_5 HAVE_GETHOSTBYADDR_R_7 HAVE_GETHOSTBYADDR_R_8 HAVE_GETHOSTBYADDR_R_5_REENTRANT @@ -458,6 +463,9 @@ SET(CMAKE_REQUIRED_FLAGS) # Check for nonblocking #OPTION(CURL_HAVE_DISABLED_NONBLOCKING "Disable non-blocking socket detection" OFF) SET(HAVE_DISABLED_NONBLOCKING) +IF(WIN32) + SET(CURL_HAVE_DISABLED_NONBLOCKING 1) +ENDIF(WIN32) IF(CURL_HAVE_DISABLED_NONBLOCKING) SET(HAVE_SOME_NONBLOCK 0) FOREACH(CURL_TEST |