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
This commit is contained in:
Jay Satiro 2022-11-27 16:03:39 -05:00
parent 7865d09e4c
commit 57d3477e77
9 changed files with 2 additions and 17 deletions

View File

@ -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)

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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)