From fe3463eba7aebd0fc0d530c7cf81ef467b6cef9b Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Sun, 27 Nov 2022 16:12:12 -0500 Subject: [PATCH] build: assume errno.h is always available - Remove errno.h detection from all build configurations. errno.h is a standard header according to C89. Closes https://github.com/curl/curl/pull/9986 --- CMakeLists.txt | 1 - configure.ac | 1 - lib/config-amigaos.h | 1 - lib/config-dos.h | 1 - lib/config-mac.h | 1 - lib/config-os400.h | 3 --- lib/config-plan9.h | 1 - lib/config-riscos.h | 3 --- lib/config-win32.h | 4 ---- lib/config-win32ce.h | 3 --- lib/curl_config.h.cmake | 3 --- lib/curl_setup_once.h | 3 --- 12 files changed, 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ecc57d11e..b435207514 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -975,7 +975,6 @@ check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H) check_include_file_concat("sys/xattr.h" HAVE_SYS_XATTR_H) check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H) check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H) -check_include_file_concat("errno.h" HAVE_ERRNO_H) check_include_file_concat("fcntl.h" HAVE_FCNTL_H) check_include_file_concat("idn2.h" HAVE_IDN2_H) check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H) diff --git a/configure.ac b/configure.ac index ef607afa9d..d4fc183ed9 100644 --- a/configure.ac +++ b/configure.ac @@ -3334,7 +3334,6 @@ AC_CHECK_HEADERS( sys/resource.h \ libgen.h \ locale.h \ - errno.h \ stdbool.h \ arpa/tftp.h \ sys/filio.h \ diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h index 20ea27df7a..baf592cb31 100644 --- a/lib/config-amigaos.h +++ b/lib/config-amigaos.h @@ -32,7 +32,6 @@ #define HAVE_ARPA_INET_H 1 #define HAVE_CLOSESOCKET_CAMEL 1 -#define HAVE_ERRNO_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_IOCTLSOCKET_CAMEL 1 #define HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1 diff --git a/lib/config-dos.h b/lib/config-dos.h index 2380182a06..9cbb8fc804 100644 --- a/lib/config-dos.h +++ b/lib/config-dos.h @@ -44,7 +44,6 @@ #define USE_MANUAL 1 #define HAVE_ARPA_INET_H 1 -#define HAVE_ERRNO_H 1 #define HAVE_FCNTL_H 1 #define HAVE_FREEADDRINFO 1 #define HAVE_GETADDRINFO 1 diff --git a/lib/config-mac.h b/lib/config-mac.h index b1bfa43e74..0ee185f8f8 100644 --- a/lib/config-mac.h +++ b/lib/config-mac.h @@ -37,7 +37,6 @@ /* Define if you want the built-in manual */ #define USE_MANUAL 1 -#define HAVE_ERRNO_H 1 #define HAVE_NETINET_IN_H 1 #define HAVE_SYS_SOCKET_H 1 #define HAVE_NETDB_H 1 diff --git a/lib/config-os400.h b/lib/config-os400.h index e733e36e3f..17f7f05f86 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -80,9 +80,6 @@ /* Define if you have the `closesocket' function. */ #undef HAVE_CLOSESOCKET -/* Define if you have the header file. */ -#define HAVE_ERRNO_H - /* Define if you have the header file. */ #define HAVE_FCNTL_H diff --git a/lib/config-plan9.h b/lib/config-plan9.h index 0d89ec0a4f..8517591ae8 100644 --- a/lib/config-plan9.h +++ b/lib/config-plan9.h @@ -78,7 +78,6 @@ #define HAVE_ARPA_INET_H 1 #define HAVE_BASENAME 1 #define HAVE_BOOL_T 1 -#define HAVE_ERRNO_H 1 #define HAVE_FCNTL 1 #define HAVE_FCNTL_H 1 #define HAVE_FREEADDRINFO 1 diff --git a/lib/config-riscos.h b/lib/config-riscos.h index 349fd8caca..a29ea7155b 100644 --- a/lib/config-riscos.h +++ b/lib/config-riscos.h @@ -81,9 +81,6 @@ /* Define if you have the `closesocket' function. */ #undef HAVE_CLOSESOCKET -/* Define if you have the header file. */ -#define HAVE_ERRNO_H - /* Define if you have the header file. */ #define HAVE_FCNTL_H diff --git a/lib/config-win32.h b/lib/config-win32.h index a482821414..7c9bde610d 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -35,9 +35,6 @@ /* Define if you have the header file. */ /* #define HAVE_ARPA_INET_H 1 */ -/* Define if you have the header file. */ -#define HAVE_ERRNO_H 1 - /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 @@ -339,7 +336,6 @@ # undef USE_WINSOCK # undef HAVE_WINSOCK2_H # undef HAVE_WS2TCPIP_H -# undef HAVE_ERRNO_H # undef HAVE_GETHOSTNAME # undef LWIP_POSIX_SOCKETS_IO_NAMES # undef RECV_TYPE_ARG1 diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index deaa1c7f7f..30829b482f 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -35,9 +35,6 @@ /* Define if you have the header file. */ /* #define HAVE_ARPA_INET_H 1 */ -/* Define if you have the header file. */ -/* #define HAVE_ERRNO_H 1 */ - /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 67eb74473b..8f8964e643 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -171,9 +171,6 @@ /* Define to 1 if you have the `closesocket' function. */ #cmakedefine HAVE_CLOSESOCKET 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ERRNO_H 1 - /* Define to 1 if you have the fcntl function. */ #cmakedefine HAVE_FCNTL 1 diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h index c53b0aad72..ac4a7f1b35 100644 --- a/lib/curl_setup_once.h +++ b/lib/curl_setup_once.h @@ -34,10 +34,7 @@ #include #include #include - -#ifdef HAVE_ERRNO_H #include -#endif #ifdef HAVE_SYS_TYPES_H #include -- 2.47.3