From: Jay Satiro Date: Sun, 27 Nov 2022 21:03:39 +0000 (-0500) Subject: build: assume assert.h is always available X-Git-Tag: curl-7_87_0~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57d3477e77629430889a4159d2bf803892caf7c7;p=thirdparty%2Fcurl.git build: assume assert.h is always available - Remove assert.h detection from all build configurations. assert.h is a standard header according to C89. I had proposed this several years ago as part of a larger change that was abandoned. Ref: https://github.com/curl/curl/issues/1237#issuecomment-277500720 Closes https://github.com/curl/curl/pull/9985 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 091746b462..9ecc57d11e 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("assert.h" HAVE_ASSERT_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) diff --git a/configure.ac b/configure.ac index 5b82d439b0..ef607afa9d 100644 --- a/configure.ac +++ b/configure.ac @@ -3307,13 +3307,12 @@ AC_CHECK_HEADERS( sys/socket.h \ sys/ioctl.h \ sys/uio.h \ - assert.h \ unistd.h \ stdlib.h \ arpa/inet.h \ net/if.h \ netinet/in.h \ - netinet/in6.h \ + netinet/in6.h \ sys/un.h \ linux/tcp.h \ netinet/tcp.h \ diff --git a/lib/config-dos.h b/lib/config-dos.h index 6532637e90..2380182a06 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_ASSERT_H 1 #define HAVE_ERRNO_H 1 #define HAVE_FCNTL_H 1 #define HAVE_FREEADDRINFO 1 diff --git a/lib/config-plan9.h b/lib/config-plan9.h index c0a78f71e6..0d89ec0a4f 100644 --- a/lib/config-plan9.h +++ b/lib/config-plan9.h @@ -76,7 +76,6 @@ #define HAVE_ALARM 1 #define HAVE_ARPA_INET_H 1 -#define HAVE_ASSERT_H 1 #define HAVE_BASENAME 1 #define HAVE_BOOL_T 1 #define HAVE_ERRNO_H 1 diff --git a/lib/config-win32.h b/lib/config-win32.h index 79ac15c65f..a482821414 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_ASSERT_H 1 - /* Define if you have the header file. */ #define HAVE_ERRNO_H 1 diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 29661ed23f..deaa1c7f7f 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_ASSERT_H 1 */ - /* Define if you have the header file. */ /* #define HAVE_ERRNO_H 1 */ diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index e12d48901f..67eb74473b 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -150,9 +150,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ARPA_TFTP_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ASSERT_H 1 - /* Define to 1 if you have _Atomic support. */ #cmakedefine HAVE_ATOMIC 1 diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 2b85a60e4c..434b86c344 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -322,9 +322,7 @@ #endif #include -#ifdef HAVE_ASSERT_H #include -#endif #ifdef __TANDEM /* for ns*-tandem-nsk systems */ # if ! defined __LP64 diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h index f09b00f9f2..c53b0aad72 100644 --- a/lib/curl_setup_once.h +++ b/lib/curl_setup_once.h @@ -287,7 +287,7 @@ typedef unsigned int bit; */ #undef DEBUGASSERT -#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H) +#if defined(DEBUGBUILD) #define DEBUGASSERT(x) assert(x) #else #define DEBUGASSERT(x) do { } while(0)