diff --git a/CHANGES b/CHANGES index c70a5eec3..fdc2a3307 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,14 @@ Changelog +Yang Tse (26 Aug 2008) +- Added check and symbol definition for WIN32 file API usage in configure, + supporting configure's --disable-largefile option for WIN32 targets also. + +- Non-configure systems which do not use config-win32.h configuration file, + and want to use the WIN32 file API, must define USE_WIN32_LARGE_FILES or + USE_WIN32_SMALL_FILES as appropriate in their own configuration files. + Daniel Stenberg (23 Aug 2008) - Running 'make ca-firefox' in the root build dir will now run the new firefox-db2pem.sh conversion script that converts a local Firefox db of ca diff --git a/acinclude.m4 b/acinclude.m4 index 1e1c99b78..71c3ca579 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3895,3 +3895,60 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [ # ]) + +dnl CURL_CHECK_WIN32_LARGEFILE +dnl ------------------------------------------------- +dnl Check if curl's WIN32 large file will be used + +AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl + AC_MSG_CHECKING([whether build target supports WIN32 file API]) + curl_win32_file_api="no" + if test "$ac_cv_header_windows_h" = "yes"; then + if test x"$enable_largefile" != "xno"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ +#if !defined(_WIN32_WCE) && \ + (defined(__MINGW32__) || \ + (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64)))) + int dummy=1; +#else + WIN32 large file API not supported. +#endif + ]]) + ],[ + curl_win32_file_api="win32_large_files" + ]) + fi + if test "$curl_win32_file_api" = "no"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ +#if defined(_WIN32_WCE) || defined(__MINGW32__) || defined(_MSC_VER) + int dummy=1; +#else + WIN32 small file API not supported. +#endif + ]]) + ],[ + curl_win32_file_api="win32_small_files" + ]) + fi + fi + case "$curl_win32_file_api" in + win32_large_files) + AC_MSG_RESULT([yes (large file enabled)]) + AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1, + [Define to 1 if you are building a Windows target with large file support.]) + ;; + win32_small_files) + AC_MSG_RESULT([yes (large file disabled)]) + AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1, + [Define to 1 if you are building a Windows target without large file support.]) + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +]) \ No newline at end of file diff --git a/configure.ac b/configure.ac index c9e4f3388..6d7dd0e35 100644 --- a/configure.ac +++ b/configure.ac @@ -348,6 +348,7 @@ case X-"$ac_cv_native_windows" in ac_cv_header_winber_h="no" ;; esac +CURL_CHECK_WIN32_LARGEFILE dnl ************************************************************ dnl switch off particular protocols