]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: fix/add missing feature detections for Windows/MS-DOS
authorViktor Szakats <commit@vsz.me>
Sat, 8 Feb 2025 02:20:02 +0000 (03:20 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 11 Feb 2025 13:15:40 +0000 (14:15 +0100)
commit6ab1fa423bcc49a742b1cde2164ff981fdee38e8
treebf3ed01a7af1c0fd5a4b37d2042eec10ef6be08c
parente520493742efdbf7c606c631794617a72a154947
cmake: fix/add missing feature detections for Windows/MS-DOS

Almost all feature detection results are pre-filled on Windows
for performance, so none of the issues fixed here affected builds.

For good measure, this patch add missing detections and fixes others
to make sure they work even when omitting the pre-fill.

It also fixes detecting IPv6 for MS-DOS.

- fix `HAVE_STRUCT_TIMEVAL` detection for MSVC.
  Follow-up to c1bc090d65b8d7d14e811dd36f5e8674be43dff3 #12495
- add `HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID` detection for Windows.
- fix `HAVE_STRDUP` detection for MSVC.
- fix `HAVE_SNPRINTF` detection for Windows.
  Regression from 8e345057761a8f796403923a96f2c8fd3edca647 #15164
- fix `HAVE_IOCTLSOCKET` detection for non-UWP MSVC.
- exclude `if_nametoindex` detection for Windows.
  Although it exists on Windows, detection, usage and availability is
  complicated, and curl doesn't use it on this platform.
  Regression from 8e345057761a8f796403923a96f2c8fd3edca647 #15164
- move IPv6 detections so that pre-filling and MS-DOS Watt-32
  configuration applies to them. This fixes
  `HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID` detection with MS-DOS.
  Ref: https://github.com/curl/curl/actions/runs/13260511764/job/37015877585#step:7:306
  Follow-up to a3585c9576abccddbd27200058912cef900c3c0f #15543

Also:
- add debug option to test without pre-filling.
- replace `NOT LESS` with `GREATER_EQUAL`

Closes #16278
CMake/CurlTests.c
CMake/OtherTests.cmake
CMake/win32-cache.cmake
CMakeLists.txt
configure.ac