]> granicus.if.org Git - php/commitdiff
Remove HAVE_TIME_H
authorPeter Kokot <peterkokot@gmail.com>
Tue, 18 Sep 2018 17:26:19 +0000 (19:26 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Fri, 21 Sep 2018 12:10:30 +0000 (14:10 +0200)
The `<time.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

Since PHP requires at least C89 or greater, the `HAVE_TIME_H` symbol
defined by Autoconf in ext/pdo_sqlite/config.m4 [2] can be ommitted and
simplifed.

Additionally, since PHP didn't define `HAVE_TIME_H` prior in the
configure.ac the occurrence of this symbol in cli can be removed.

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

ext/pdo_sqlite/config.m4
sapi/cli/php_cli_server.c

index fcaef27eecbf7a4292cb09b26eecbdb27189d3a7..b5aa342eaf5c257ba82f5b3c8bf67ed7a45e5058 100644 (file)
@@ -102,7 +102,6 @@ if test "$PHP_PDO_SQLITE" != "no"; then
       PHP_ADD_INCLUDE($abs_srcdir/ext/sqlite3/libsqlite)
 
       AC_CHECK_FUNCS(usleep nanosleep)
-      AC_CHECK_HEADERS(time.h)
   fi
 
   dnl Solaris fix
index 5386aa54c64f0c7506fa67aebe10d83aa1185238..bcbbab3c01aa9cd0c9c8a49c4649bcbaa4bebff2 100644 (file)
 #include <unixlib/local.h>
 #endif
 
-
-#if HAVE_TIME_H
-#include <time.h>
-#endif
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif