curl/CMake
Viktor Szakats edae6c66c7
lib: sync guard for Curl_getaddrinfo_ex() definition and use
`Curl_getaddrinfo_ex()` gets _defined_ with `HAVE_GETADDRINFO` set. But,
`hostip4.c` _used_ it with `HAVE_GETADDRINFO_THREADSAFE` set alone. It
meant a build with the latter, but without the former flag could result
in calling this function but not defining it, and failing to link.

Patch this by adding an extra check for `HAVE_GETATTRINFO` around the
call.

Before this patch, build systems prevented this condition. Now they
don't need to.

While here, simplify the related CMake logic on Windows by setting
`HAVE_GETADDRINFO_THREADSAFE` to the detection result of
`HAVE_GETADDRINFO`. This expresses the following intent clearer than
the previous patch and keeps the logic in a single block of code:
When we have `getaddrinfo()` on Windows, it's always threadsafe.

Follow-up to 67d88626d4

Reviewed-by: Jay Satiro
Closes #9734
2022-11-01 22:40:36 +00:00
..
Platforms lib: sync guard for Curl_getaddrinfo_ex() definition and use 2022-11-01 22:40:36 +00:00
cmake_uninstall.cmake.in copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
CMakeConfigurableFile.in copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-config.cmake.in copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
CurlSymbolHiding.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
CurlTests.c cmake: delete duplicate HAVE_GETADDRINFO test 2022-10-14 17:31:19 +00:00
FindBearSSL.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindBrotli.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindCARES.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindGSS.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindLibPSL.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindLibSSH2.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindMbedTLS.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindMSH3.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindNGHTTP2.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindNGHTTP3.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindNGTCP2.cmake cmake: support ngtcp2 boringssl backend 2022-07-05 10:09:40 +02:00
FindNSS.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindQUICHE.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindWolfSSL.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
FindZstd.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
Macros.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
OtherTests.cmake functypes: provide the recv and send arg and return types 2022-09-28 09:06:11 +02:00
Utilities.cmake copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00