From 860f0a2ddc4b586d639caea1f9c7c10b381224e6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 3 Nov 2014 13:17:24 -0500 Subject: [PATCH] curl: Select file APIs on Windows Choose small or large file support based on capabilities of compiler and target platform. --- Utilities/cmcurl/lib/curl_config.h.cmake | 4 ---- Utilities/cmcurl/lib/curl_setup.h | 11 +++++++++++ 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 32bae39bf..ed55a65a1 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 173731c49..12238ca0e 100644 --- a/Utilities/cmcurl/lib/curl_setup.h +++ b/Utilities/cmcurl/lib/curl_setup.h @@ -345,6 +345,17 @@ #include #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. */