]> granicus.if.org Git - php/commitdiff
Remove HAVE_ASSERT_H
authorPeter Kokot <peterkokot@gmail.com>
Tue, 4 Sep 2018 22:09:56 +0000 (00:09 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Sun, 9 Sep 2018 07:43:03 +0000 (09:43 +0200)
The `<assert.h>` header file is part of the standard C89 headers [1] and
on older systems there needed to be also a manual check if header is
present.

Since PHP requires at least C89 manual check and the `HAVE_ASSERT_H`
symbol defined by Autoconf in configure.ac can be both removed [2].

This patch also removes unused <assert.h> includes where c files don't
use the `assert()` macro.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

28 files changed:
configure.ac
ext/bcmath/libbcmath/src/add.c
ext/bcmath/libbcmath/src/compare.c
ext/bcmath/libbcmath/src/debug.c
ext/bcmath/libbcmath/src/div.c
ext/bcmath/libbcmath/src/divmod.c
ext/bcmath/libbcmath/src/doaddsub.c
ext/bcmath/libbcmath/src/init.c
ext/bcmath/libbcmath/src/int2num.c
ext/bcmath/libbcmath/src/nearzero.c
ext/bcmath/libbcmath/src/neg.c
ext/bcmath/libbcmath/src/num2long.c
ext/bcmath/libbcmath/src/num2str.c
ext/bcmath/libbcmath/src/outofmem.c
ext/bcmath/libbcmath/src/output.c
ext/bcmath/libbcmath/src/raise.c
ext/bcmath/libbcmath/src/raisemod.c
ext/bcmath/libbcmath/src/rmzero.c
ext/bcmath/libbcmath/src/sqrt.c
ext/bcmath/libbcmath/src/str2num.c
ext/bcmath/libbcmath/src/sub.c
ext/bcmath/libbcmath/src/zero.c
ext/mbstring/libmbfl/config.h.in
ext/mbstring/libmbfl/config.h.w32
ext/standard/strnatcmp.c
main/php.h
main/php_syslog.c
win32/build/config.w32.h.in

index 2ad2190275ce5263d3220a730b08034da6a1e40b..aa5456e8c56c79cdb36be6b46daaf889b8de0c87 100644 (file)
@@ -434,7 +434,6 @@ netinet/in.h \
 alloca.h \
 arpa/inet.h \
 arpa/nameser.h \
-assert.h \
 crypt.h \
 dns.h \
 fcntl.h \
@@ -477,7 +476,6 @@ utime.h \
 sys/utsname.h \
 sys/ipc.h \
 dlfcn.h \
-assert.h \
 tmmintrin.h \
 nmmintrin.h \
 immintrin.h
index ade5b5969a0ed73ffd4f2fef800cb8cabd7c99b4..d41ea01914c59232870beb1287b6c24fe385d23e 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 6217ef1af3337535339d48b409c7a535b8e71e15..ced7ec19167c5c049bef4bf906a5ab5d192d1336 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 0ff7d652cd131499061c6625e162e9e218b01b91..b711c06143b238d9f39c3aafa73c6d35bb810a52 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index df5de29919061e1c3fdba04479342827a65f760a..a8039f2b767c6c2760323b169527ff84945864a1 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 08c2f8a2a2d5eb6bf223521599bc67276173e2f3..6ee6c255cb8b29e0f29619b4180b576cf3f12e6e 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index cef0fdbf1ba6caf49fd8038af940167fd078c487..dc0ba0614bf36611d8b6882e8ac156e932561c1d 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index bd73da2a9d72cb98a1a4e758b4be1af43177425b..227a34fadfe26f706d3361b68a2df45c4cd4a1a5 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index a8965f6040efaed4c41ff98d7db8c68c9a0e18a0..12a3342c397c6edbfcec79169885d4472cce4b15 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 1f2f0708ccf7f4c9c7615207cc105705af994b63..041c7e149dcd0322367a71c81b8c8021e91f08c1 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 619a59bb05c2f5c9866d28e21eb9d83a9246a736..8c009055989f4b98bc016f5b07a60a86b6fad9ff 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index be84986d236ed395cf0c5fce47ded60529bc71e3..2cef6791c4aa673bbad0acf77653d46be286a8d0 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 7316d32a14abe9c1ee087e72dd3c5ede623f7b2f..742d3278e73772442e5008dbce2a4ec54b7842e2 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 7c675096865cbd6a0b167bd48994eef5e82baab7..e1e3f5317f81cde74fc7b809fe6720da704e14fa 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 9fbca0f4c4ad48c083621dc6b7f43e1d818ee10f..e172662002eb6f039828bf8ff32b421bb188d694 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index c7838be59754ba7b1c0a53c39040627a35f9a110..4b938cb3b343376913365a4a5fb8c31691a80712 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index a3154b55cd83051b55222986ea205267e4f9188e..9b371cc4e0d860314f1b0fc626793fda05d98180 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 1b81601b2016dc95fa53d55572177b0d5473460e..4751099d240bd969ce62518ca5c60c81f33a2a50 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 265d75b5fbae8986a5748d2c15045a876ce1ad6b..ffb19fc51984635682dbf4b2bb60be09eef5333d 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index 62544de80ec9fe9c8062d2fbed336dd617b1b3cb..abf68eb1e5696a1311d6915972e7c031746182e7 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index b63f1bc90acd0810ac9333b54a19b570d1db5e5c..86c876d1c634b2026fb88a0cc6131d3bdc28ebd8 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index ffb549754685b68888d266ce9310c51c750b2fd5..6f0e93a0263f6c53028d05cc8ea2607b49a6a9b3 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdarg.h>
index c30fa09f4ae1dcccac5fffd2e1101c5912a301c1..28bb935f937457ba39630ad97bc7e3bd7c8922a3 100644 (file)
@@ -1,8 +1,5 @@
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
index 14393a074125ffe3b7f2a932bad393b2f8588150..4ec537284d5206057f8b3692cf8d5ff318c533d4 100644 (file)
@@ -1,6 +1,5 @@
 #define HAVE_STDIO_H 1
 #define HAVE_STDLIB_H 1
-#define HAVE_ASSERT_H 1
 #define HAVE_MEMORY_H 1
 /* #undef HAVE_STRINGS_H */
 #define HAVE_STRING_H 1
index 64ff8fc37d329761205ed0bf9a4249aaada98baa..bcbd556afe3fd64219e1c490cf1c580a16764e5f 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <ctype.h>
 #include <string.h>
-#include <assert.h>
 #include <stdio.h>
 
 #include "php.h"
index 697d3ff935c228201b68b1db88defcf6b4459530..4134f7b3d427830cb1b385adf89101b367f6fecb 100644 (file)
@@ -123,7 +123,6 @@ typedef int pid_t;
 # endif
 #endif
 
-#if HAVE_ASSERT_H
 #if PHP_DEBUG
 #undef NDEBUG
 #else
@@ -132,9 +131,6 @@ typedef int pid_t;
 #endif
 #endif
 #include <assert.h>
-#else /* HAVE_ASSERT_H */
-#define assert(expr) ((void) (0))
-#endif /* HAVE_ASSERT_H */
 
 #define APACHE 0
 
index dd16f05217c1f0d4ce143d105319a1a2acb22cc2..2170ac70be088bf83a6f0be521baf95d2fb5ca76 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <assert.h>
 #include <stdlib.h>
 #include "php.h"
 #include "php_syslog.h"
index 4a510ea6b443db91f2a7fc23687431468630ddb4..3275552b46b4f9506d3fdf1f8377884754f0a3d7 100644 (file)
@@ -95,7 +95,6 @@
 #define HAVE_TEMPNAM 1
 #define HAVE_UTIME 1
 #undef HAVE_DIRENT_H
-#define HAVE_ASSERT_H 1
 #define HAVE_FCNTL_H 1
 #define HAVE_GRP_H 0
 #undef HAVE_PWD_H