]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: drop `fseeko()` pre-fill and check for Windows
authorViktor Szakats <commit@vsz.me>
Fri, 17 Jan 2025 23:07:16 +0000 (00:07 +0100)
committerViktor Szakats <commit@vsz.me>
Sun, 19 Jan 2025 14:03:16 +0000 (15:03 +0100)
To sync detection code with autotools.

Closes #16041

CMake/win32-cache.cmake
CMakeLists.txt
lib/curl_setup.h

index fb1f2ec0047e7947dbe6dbb035106aa513d58a5a..9d46736d577eb86c0bc109da9fbdb1d6d5100599 100644 (file)
@@ -161,7 +161,6 @@ set(HAVE_TERMIOS_H 0)
 set(HAVE_TERMIO_H 0)
 set(HAVE_LINUX_TCP_H 0)
 
-set(HAVE_FSEEKO 0)  # mingw-w64 2.0.0 and newer has it
 set(HAVE_SOCKET 1)
 set(HAVE_SELECT 1)
 set(HAVE_STRDUP 1)
index ce22cba5afaaf5af63de142aa1bf48033d9718cc..1ffc0035cbdd1fa914764e93d33fa9ab877ef07a 100644 (file)
@@ -1788,13 +1788,15 @@ if(HAVE_FILE_OFFSET_BITS)
 endif()
 check_type_size("off_t" SIZEOF_OFF_T)
 
-# fseeko may not exist with _FILE_OFFSET_BITS=64 but can exist with
-# _FILE_OFFSET_BITS unset or 32 (e.g. Android ARMv7 with NDK 26b and API level < 24)
-# so we need to test fseeko after testing for _FILE_OFFSET_BITS
-check_symbol_exists("fseeko" "${CURL_INCLUDES};stdio.h" HAVE_FSEEKO)
+if(NOT WIN32)
+  # fseeko may not exist with _FILE_OFFSET_BITS=64 but can exist with
+  # _FILE_OFFSET_BITS unset or 32 (e.g. Android ARMv7 with NDK 26b and API level < 24)
+  # so we need to test fseeko after testing for _FILE_OFFSET_BITS
+  check_symbol_exists("fseeko" "${CURL_INCLUDES};stdio.h" HAVE_FSEEKO)
 
-if(HAVE_FSEEKO)
-  set(HAVE_DECL_FSEEKO 1)
+  if(HAVE_FSEEKO)
+    set(HAVE_DECL_FSEEKO 1)
+  endif()
 endif()
 
 # Include this header to get the type
index 6864d5f56d512fae5507ccf9b6107f2e031d375c..ca4494e317e19fc6ccc34ed0bf2525fab8b14a53 100644 (file)
@@ -941,7 +941,7 @@ endings either CRLF or LF so 't' is appropriate.
    as their argument */
 #define STRCONST(x) x,sizeof(x)-1
 
-/* Some versions of the Android SDK is missing the declaration */
+/* Some versions of the Android NDK is missing the declaration */
 #if defined(HAVE_GETPWUID_R) && \
   defined(__ANDROID_API__) && (__ANDROID_API__ < 21)
 struct passwd;