diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2022-11-27 16:03:39 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2022-12-07 14:30:32 -0500 |
commit | 57d3477e77629430889a4159d2bf803892caf7c7 (patch) | |
tree | 535ee39190cfbe3ddf3eeb0cf940879bf62aa2fe | |
parent | 7865d09e4cddeb8faebadcbd24fb8f26cc9f81ec (diff) | |
download | curl-57d3477e77629430889a4159d2bf803892caf7c7.tar.gz |
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
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | lib/config-dos.h | 1 | ||||
-rw-r--r-- | lib/config-plan9.h | 1 | ||||
-rw-r--r-- | lib/config-win32.h | 3 | ||||
-rw-r--r-- | lib/config-win32ce.h | 3 | ||||
-rw-r--r-- | lib/curl_config.h.cmake | 3 | ||||
-rw-r--r-- | lib/curl_setup.h | 2 | ||||
-rw-r--r-- | lib/curl_setup_once.h | 2 |
9 files changed, 2 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 091746b46..9ecc57d11 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 5b82d439b..ef607afa9 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 6532637e9..2380182a0 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 c0a78f71e..0d89ec0a4 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 79ac15c65..a48282141 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -35,9 +35,6 @@ /* Define if you have the <arpa/inet.h> header file. */ /* #define HAVE_ARPA_INET_H 1 */ -/* Define if you have the <assert.h> header file. */ -#define HAVE_ASSERT_H 1 - /* Define if you have the <errno.h> header file. */ #define HAVE_ERRNO_H 1 diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 29661ed23..deaa1c7f7 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -35,9 +35,6 @@ /* Define if you have the <arpa/inet.h> header file. */ /* #define HAVE_ARPA_INET_H 1 */ -/* Define if you have the <assert.h> header file. */ -/* #define HAVE_ASSERT_H 1 */ - /* Define if you have the <errno.h> header file. */ /* #define HAVE_ERRNO_H 1 */ diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index e12d48901..67eb74473 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -150,9 +150,6 @@ /* Define to 1 if you have the <arpa/tftp.h> header file. */ #cmakedefine HAVE_ARPA_TFTP_H 1 -/* Define to 1 if you have the <assert.h> 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 2b85a60e4..434b86c34 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -322,9 +322,7 @@ #endif #include <stdio.h> -#ifdef HAVE_ASSERT_H #include <assert.h> -#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 f09b00f9f..c53b0aad7 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) |