summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-11-03 18:17:24 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-10 15:00:45 (GMT)
commit860f0a2ddc4b586d639caea1f9c7c10b381224e6 (patch)
tree37094db3d311448c51d22c1116c505d6946aa68c
parent5a3b55ed7c0419aa09adba38db41a258118dd580 (diff)
downloadCMake-860f0a2ddc4b586d639caea1f9c7c10b381224e6.zip
CMake-860f0a2ddc4b586d639caea1f9c7c10b381224e6.tar.gz
CMake-860f0a2ddc4b586d639caea1f9c7c10b381224e6.tar.bz2
curl: Select file APIs on Windows
Choose small or large file support based on capabilities of compiler and target platform.
-rw-r--r--Utilities/cmcurl/lib/curl_config.h.cmake4
-rw-r--r--Utilities/cmcurl/lib/curl_setup.h11
2 files changed, 11 insertions, 4 deletions
diff --git a/Utilities/cmcurl/lib/curl_config.h.cmake b/Utilities/cmcurl/lib/curl_config.h.cmake
index 32bae39..ed55a65 100644
--- a/Utilities/cmcurl/lib/curl_config.h.cmake
+++ b/Utilities/cmcurl/lib/curl_config.h.cmake
@@ -906,10 +906,6 @@
/* if SSL is enabled */
#cmakedefine USE_SSLEAY 1
-/* Define to 1 if you are building a Windows target without large file
- support. */
-#cmakedefine USE_WIN32_LARGE_FILES 1
-
/* to enable SSPI support */
#cmakedefine USE_WINDOWS_SSPI 1
diff --git a/Utilities/cmcurl/lib/curl_setup.h b/Utilities/cmcurl/lib/curl_setup.h
index 173731c..12238ca 100644
--- a/Utilities/cmcurl/lib/curl_setup.h
+++ b/Utilities/cmcurl/lib/curl_setup.h
@@ -345,6 +345,17 @@
#include <clib.h>
#endif
+/* Default Windows file API selection. */
+#ifdef _WIN32
+# if defined(_MSC_VER) && (_INTEGRAL_MAX_BITS >= 64)
+# define USE_WIN32_LARGE_FILES
+# elif defined(__MINGW32__)
+# define USE_WIN32_LARGE_FILES
+# else
+# define USE_WIN32_SMALL_FILES
+# endif
+#endif
+
/*
* Large file (>2Gb) support using WIN32 functions.
*/