windows: drop redundant USE_WIN32_SMALL_FILES macro

In effect it meant `_WIN32 && !USE_WIN32_LARGE_FILES`.
Replace it with these macros.

Also:
- configure: delete tautological check for small file support.
- configure: delete stray `_MSC_VER` reference. autotools does not
  support MSVC.
- drop tautological checks for WinCE in `config-win32*.h` when setting
  `USE_WIN32_LARGE_FILES`.
- merge related PP logic.
- prefer `#ifdef`, fix whitespace.

Suggested-by: Marcel Raad
Report: https://github.com/curl/curl/pull/15952#issuecomment-2580092328

Closes #15968
This commit is contained in:
Viktor Szakats 2025-01-11 03:22:10 +01:00
parent b9840814ad
commit 7eb4ddb850
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 14 additions and 46 deletions

View file

@ -1385,7 +1385,7 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
#if !defined(_WIN32_WCE) && (defined(__MINGW32__) || defined(_MSC_VER))
#if !defined(_WIN32_WCE) && defined(__MINGW32__)
int dummy=1;
#else
#error Win32 large file API not supported.
@ -1396,18 +1396,7 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
])
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
#error Win32 small file API not supported.
#endif
]])
],[
curl_win32_file_api="win32_small_files"
])
curl_win32_file_api="win32_small_files"
fi
fi
case "$curl_win32_file_api" in
@ -1418,8 +1407,6 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
;;
win32_small_files)
AC_MSG_RESULT([yes (large file disabled)])
AC_DEFINE_UNQUOTED(USE_WIN32_SMALL_FILES, 1,
[Define to 1 if you are building a Windows target without large file support.])
;;
*)
AC_MSG_RESULT([no])