summaryrefslogtreecommitdiff
path: root/lib/curl_config.h.cmake
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2022-10-14 18:19:09 +0000
committerViktor Szakats <commit@vsz.me>2022-10-14 18:19:09 +0000
commit67d88626d44ec04b9e11dca4cfbf62cd29fe9781 (patch)
treef60b5b25f1eab62a3f0ba4bd9d9d7b7d1c3cdf4d /lib/curl_config.h.cmake
parent790779fc3444a5cbf0208dd8b06785bea7f25681 (diff)
downloadcurl-67d88626d44ec04b9e11dca4cfbf62cd29fe9781.tar.gz
cmake: set HAVE_GETADDRINFO_THREADSAFE on Windows
autotools enables this configuration option unconditionally for Windows [^1]. Do the same in CMake. The above will make this work for all reasonably recent environments. The logic present in `lib/config-win32.h` [^2] has the following exceptions which we did not cover in this CMake update: - Builds targeting Windows 2000 and earlier - MS Visual C++ 5.0 (1997) and earlier Also make sure to disable this feature when `HAVE_GETADDRINFO` isn't set, to avoid a broken build. We might want to handle that in the C sources in a future commit. [^1]: https://github.com/curl/curl/blob/68fa9bf3f5d7b4fcbb57619f70cb4aabb79a51f6/m4/curl-functions.m4#L2067-L2070 [^2]: https://github.com/curl/curl/blob/68fa9bf3f5d7b4fcbb57619f70cb4aabb79a51f6/lib/config-win32.h#L511-L528 Closes #9727
Diffstat (limited to 'lib/curl_config.h.cmake')
-rw-r--r--lib/curl_config.h.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
index 5ac20dff0..3ba14923c 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -195,6 +195,9 @@
/* Define to 1 if you have a working getaddrinfo function. */
#cmakedefine HAVE_GETADDRINFO 1
+/* Define to 1 if the getaddrinfo function is threadsafe. */
+#cmakedefine HAVE_GETADDRINFO_THREADSAFE 1
+
/* Define to 1 if you have the `geteuid' function. */
#cmakedefine HAVE_GETEUID 1