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.
This commit is contained in:
Yang Tse 2008-08-26 12:54:12 +00:00
parent 2fdd24c724
commit fef60d9d41
3 changed files with 66 additions and 0 deletions

View File

@ -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

View File

@ -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
])

View File

@ -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