]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: cache more config and delete unused ones
authorViktor Szakats <commit@vsz.me>
Sun, 30 Jul 2023 16:13:02 +0000 (16:13 +0000)
committerViktor Szakats <commit@vsz.me>
Tue, 1 Aug 2023 21:59:00 +0000 (21:59 +0000)
- cache more Windows config results for faster initialization.

- delete unused config macros `HAVE_SYS_UTSNAME_H`, `HAVE_SSL_H`.

- delete dead references to `sys/utsname.h`.

Closes #11551

13 files changed:
CMake/Platforms/WindowsCache.cmake
CMakeLists.txt
lib/config-os400.h
lib/config-riscos.h
lib/config-win32.h
lib/config-win32ce.h
lib/curl_config.h.cmake
lib/ftp.c
lib/imap.c
lib/pop3.c
lib/smtp.c
lib/vssh/libssh.c
lib/vssh/libssh2.c

index c69c33cc36e17e43d7d11a1439d4e4b84fa2bfb5..7920bd28b748ee9bd2e1c4a7cbcc1231b86d7d31 100644 (file)
 ###########################################################################
 if(NOT UNIX)
   if(WIN32)
+
+    set(HAVE_WINDOWS_H 1)
+    set(HAVE_WS2TCPIP_H 1)
+    set(HAVE_WINSOCK2_H 1)
+    set(HAVE_WINCRYPT_H 1)
+
+    if(MINGW)
+      set(HAVE_SNPRINTF 1)
+      set(HAVE_UNISTD_H 1)
+      set(HAVE_INTTYPES_H 1)
+      set(HAVE_STRTOLL 1)
+    elseif(MSVC)
+      if(NOT MSVC_VERSION LESS 1800)
+        set(HAVE_INTTYPES_H 1)
+        set(HAVE_STRTOLL 1)
+      else()
+        set(HAVE_INTTYPES_H 0)
+        set(HAVE_STRTOLL 0)
+      endif()
+      if(NOT MSVC_VERSION LESS 1900)
+        set(HAVE_SNPRINTF 1)
+      else()
+        set(HAVE_SNPRINTF 0)
+      endif()
+    endif()
+
     set(HAVE_LIBSOCKET 0)
     set(HAVE_GETHOSTNAME 1)
     set(HAVE_LIBZ 0)
 
     set(HAVE_ARPA_INET_H 0)
+    set(HAVE_ARPA_TFTP_H 0)
     set(HAVE_FCNTL_H 1)
+    set(HAVE_IFADDRS_H 0)
     set(HAVE_IO_H 1)
     set(HAVE_NETDB_H 0)
     set(HAVE_NETINET_IN_H 0)
+    set(HAVE_NETINET_TCP_H 0)
     set(HAVE_NET_IF_H 0)
+    set(HAVE_IOCTL_SIOCGIFADDR 0)
+    set(HAVE_POLL_H 0)
     set(HAVE_PWD_H 0)
     set(HAVE_SETJMP_H 1)
     set(HAVE_SIGNAL_H 1)
     set(HAVE_STDLIB_H 1)
     set(HAVE_STRINGS_H 0)
     set(HAVE_STRING_H 1)
+    set(HAVE_SYS_FILIO_H 0)
+    set(HAVE_SYS_IOCTL_H 0)
     set(HAVE_SYS_PARAM_H 0)
     set(HAVE_SYS_POLL_H 0)
+    set(HAVE_SYS_RESOURCE_H 0)
     set(HAVE_SYS_SELECT_H 0)
     set(HAVE_SYS_SOCKET_H 0)
     set(HAVE_SYS_SOCKIO_H 0)
     set(HAVE_SYS_STAT_H 1)
     set(HAVE_SYS_TIME_H 0)
     set(HAVE_SYS_TYPES_H 1)
+    set(HAVE_SYS_UN_H 0)
     set(HAVE_SYS_UTIME_H 1)
     set(HAVE_TERMIOS_H 0)
     set(HAVE_TERMIO_H 0)
@@ -69,6 +104,9 @@ if(NOT UNIX)
     set(HAVE_GMTIME_R 0)
     set(HAVE_GETHOSTBYNAME_R 0)
     set(HAVE_SIGNAL 1)
+    set(HAVE_LINUX_TCP_H 0)
+    set(HAVE_GLIBC_STRERROR_R 0)
+    set(HAVE_MACH_ABSOLUTE_TIME 0)
 
     set(HAVE_GETHOSTBYNAME_R_3 0)
     set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
index e19deb605eae801958e482fd7812bda11d1959fe..706d9db41e9280b5971a3dbb22214fce530ffa21 100644 (file)
@@ -1033,7 +1033,6 @@ check_include_file_concat("poll.h"           HAVE_POLL_H)
 check_include_file_concat("pwd.h"            HAVE_PWD_H)
 check_include_file_concat("setjmp.h"         HAVE_SETJMP_H)
 check_include_file_concat("signal.h"         HAVE_SIGNAL_H)
-check_include_file_concat("ssl.h"            HAVE_SSL_H)
 check_include_file_concat("stdatomic.h"      HAVE_STDATOMIC_H)
 check_include_file_concat("stdbool.h"        HAVE_STDBOOL_H)
 check_include_file_concat("stdint.h"         HAVE_STDINT_H)
@@ -1048,7 +1047,6 @@ check_include_file_concat("unistd.h"         HAVE_UNISTD_H)
 check_include_file_concat("utime.h"          HAVE_UTIME_H)
 
 check_include_file_concat("stddef.h"         HAVE_STDDEF_H)
-check_include_file_concat("sys/utsname.h"   HAVE_SYS_UTSNAME_H)
 
 check_type_size(size_t  SIZEOF_SIZE_T)
 check_type_size(ssize_t  SIZEOF_SSIZE_T)
index db8e9082e28771c3cd7a658d1c8849bf181b822f..083fb316d665da651afad0ee9f961ec9ccd4de35 100644 (file)
 /* Define if you have the `socket' function. */
 #define HAVE_SOCKET
 
-/* Define if you have the <ssl.h> header file. */
-#undef HAVE_SSL_H
-
 /* Define if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
index a9268e1e90cdbac8f493d0bea59a18be323561e3..94946187d8c3f210a094251d923b7505af6fb866 100644 (file)
 /* Define if you have the `socket' function. */
 #define HAVE_SOCKET
 
-/* Define if you have the <ssl.h> header file. */
-#undef HAVE_SSL_H
-
 /* Define if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
index 0879e232ab66d5761091c030c0dff3e4f4d0176c..fd2503668f4222f37dbd3a5b18bea3ab63eab396 100644 (file)
@@ -71,9 +71,6 @@
 /* Define if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
-/* Define if you have the <ssl.h> header file. */
-/* #define HAVE_SSL_H 1 */
-
 /* Define to 1 if you have the <stdbool.h> header file. */
 #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || \
     defined(__MINGW64_VERSION_MAJOR)
index 825f5e60ce26a82f6d869cc558bfe5b7ab082a7c..2f9a530524259323267244bd2f5eebdf4c302d52 100644 (file)
@@ -53,9 +53,6 @@
 /* Define if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
-/* Define if you have the <ssl.h> header file.  */
-/* #define HAVE_SSL_H 1 */
-
 /* Define if you have the <stdlib.h> header file.  */
 #define HAVE_STDLIB_H 1
 
index cdc59333cdd7232c78ad9d219c188080d51b2ef8..9c17b7360e363e7bb42bf6c17bd7de3e63313807 100644 (file)
 /* Define to 1 if you have the socketpair function. */
 #cmakedefine HAVE_SOCKETPAIR 1
 
-/* Define to 1 if you have the <ssl.h> header file. */
-#cmakedefine HAVE_SSL_H 1
-
 /* Define to 1 if you have the <stdatomic.h> header file. */
 #cmakedefine HAVE_STDATOMIC_H 1
 
index c04daa8c72bc5b60a1dbfdaf75e9696f76530a15..aaf26d5494ad5ae402b22323cb3307f38b26532d 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -32,9 +32,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UTSNAME_H
-#include <sys/utsname.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 045fe24fd50b680795aca3c9fd0377ff235d3360..57ab504a6f8569510d734bc4cf623f02a2462d8c 100644 (file)
@@ -45,9 +45,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UTSNAME_H
-#include <sys/utsname.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index ddb98bfdf4a8de2e286e70f4f409e36e443d3d86..a2ab34aef1e40b8edf7f250c81b078ee0497d099 100644 (file)
@@ -47,9 +47,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UTSNAME_H
-#include <sys/utsname.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index afcdd10ab9af0a8469c02bbe4fc2b84d61f63c8f..81a17e38db41d72ec58a7bf7eaeade10f8e40214 100644 (file)
@@ -49,9 +49,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UTSNAME_H
-#include <sys/utsname.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 1cecb649cb6239f88cf039e5ea90ca00bc478b11..722b313359a7f33aa9a5fa9800b502a4de3d31ed 100644 (file)
@@ -40,9 +40,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UTSNAME_H
-#include <sys/utsname.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 98fce5177f2eeb1f88367f2e7000420a1d03b97e..b3d07bf6ef3b02e139660b9c615b9b8720680d44 100644 (file)
@@ -43,9 +43,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UTSNAME_H
-#include <sys/utsname.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif