Skip to content

Commit 0ffa84d

Browse files
committed
Refactor timelib.m4
The ext/date/lib is bundled library and also includes additional timelib.m4 macros and checks specific for PHP. All the checks in the timelib.m4 are already done in the PHP's configure.ac: - headers except for io.h and strings.h - two functions checked strftime and gettimeofday - if size of longint is 8 - if size of int is 4 - int32_t and uint32_t types using the PHP_CHECK_STDINT_TYPES Macro `AC_TIMELIB_C_BIGENDIAN` defined in timelib.m4 is not used. The two checkings for strtoll and atoll have been moved to date extension's config0.m4 file. Additional check for headers <io.h> and <strings.h> has been added to config0.m4 of the date extension. Therefore the timelib.m4 can be simplified and removed from the bundled library to have easier maintenance in the later branches and also upstream library.
1 parent 56dba3f commit 0ffa84d

File tree

2 files changed

+8
-85
lines changed

2 files changed

+8
-85
lines changed

ext/date/config0.m4

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
dnl $Id$
22
dnl config.m4 for date extension
33

4-
sinclude(ext/date/lib/timelib.m4)
5-
sinclude(lib/timelib.m4)
4+
dnl Check for headers needed by timelib
5+
AC_CHECK_HEADERS([ \
6+
strings.h \
7+
io.h
8+
])
9+
10+
dnl Check for strtoll, atoll
11+
AC_CHECK_FUNCS(strtoll atoll)
612

713
PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
814
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c

ext/date/lib/timelib.m4

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)