]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build: assume assert.h is always available
authorJay Satiro <raysatiro@yahoo.com>
Sun, 27 Nov 2022 21:03:39 +0000 (16:03 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 7 Dec 2022 19:30:32 +0000 (14:30 -0500)
- 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

CMakeLists.txt
configure.ac
lib/config-dos.h
lib/config-plan9.h
lib/config-win32.h
lib/config-win32ce.h
lib/curl_config.h.cmake
lib/curl_setup.h
lib/curl_setup_once.h

index 091746b4625bdacfd2ced427fccf3f210694b4f2..9ecc57d11edf27a4e232331084a5e7ce08591e86 100644 (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)
index 5b82d439b08141b9c06991b7840a144b859bcef9..ef607afa9d03b6edcc00dafee9bff0dd07706559 100644 (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 \
index 6532637e90b367c78f5eaa1b6c436a4d00a98269..2380182a06d322a5d7c08eaf44b9bd6f44f56ad8 100644 (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
index c0a78f71e6ce7fc0b3a200227e1afed6d9a19ee2..0d89ec0a4fa2aaa028c50719da98f89c30f513ea 100644 (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
index 79ac15c65f41fd938fafb50f8a917c10ee1756be..a4828214140ca9d9339393b6c1ba371608385910 100644 (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
 
index 29661ed23fd65ac4bf5af91c6cff8e6b05ca9368..deaa1c7f7f1b4f230db2dd5aca143ea5ab9b68f1 100644 (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 */
 
index e12d48901fa6b8335289a58326b34ac3e4a9eb32..67eb74473b069a23795ac198efab2c8f4f5693ef 100644 (file)
 /* 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
 
index 2b85a60e4cedcad708a2b02997058a7035e8995c..434b86c344bc42a91441747490a489a8e78b4c88 100644 (file)
 #endif
 
 #include <stdio.h>
-#ifdef HAVE_ASSERT_H
 #include <assert.h>
-#endif
 
 #ifdef __TANDEM /* for ns*-tandem-nsk systems */
 # if ! defined __LP64
index f09b00f9f2b3df58bd95f3579113c3db3b6e937e..c53b0aad72261f865d8ccea4413ec997008d5a22 100644 (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)