diff options
author | Peter Kokot <peterkokot@gmail.com> | 2019-02-13 19:26:02 +0100 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-02-13 19:26:02 +0100 |
commit | a89948320b7f835fa1dfe8dc3fc3f369304e5893 (patch) | |
tree | 683c3d0f83b8d13159ea163981c635f8c5be46c1 | |
parent | aa7fbdf2cd41b956cf039c9f779db265b264947d (diff) | |
parent | 0ffa84d7401d61a251029c0813e38a69f84a9486 (diff) | |
download | php-git-a89948320b7f835fa1dfe8dc3fc3f369304e5893.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Refactor timelib.m4
-rw-r--r-- | ext/date/config0.m4 | 10 | ||||
-rw-r--r-- | ext/date/lib/timelib.m4 | 80 |
2 files changed, 8 insertions, 82 deletions
diff --git a/ext/date/config0.m4 b/ext/date/config0.m4 index dfaa9bb343..6c9d614181 100644 --- a/ext/date/config0.m4 +++ b/ext/date/config0.m4 @@ -1,7 +1,13 @@ dnl config.m4 for date extension -sinclude(ext/date/lib/timelib.m4) -sinclude(lib/timelib.m4) +dnl Check for headers needed by timelib +AC_CHECK_HEADERS([ \ +strings.h \ +io.h +]) + +dnl Check for strtoll, atoll +AC_CHECK_FUNCS(strtoll atoll) PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1" timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 deleted file mode 100644 index ad21eab38a..0000000000 --- a/ext/date/lib/timelib.m4 +++ /dev/null @@ -1,80 +0,0 @@ -dnl -dnl TL_DEF_HAVE(what [, why]) -dnl -dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [WHY])' -dnl -AC_DEFUN([TL_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___),1,[ $2 ])])dnl - -dnl -dnl TL_CHECK_INT_TYPE(type) -dnl -AC_DEFUN([TL_CHECK_INT_TYPE],[ -AC_CACHE_CHECK([for $1], ac_cv_int_type_$1, [ -AC_TRY_COMPILE([ -#if HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#if HAVE_INTTYPES_H -# include <inttypes.h> -#elif HAVE_STDINT_H -# include <stdint.h> -#endif], -[if (($1 *) 0) - return 0; -if (sizeof ($1)) - return 0; -], [ac_cv_int_type_$1=yes], [ac_cv_int_type_$1=no]) -]) -if test "$ac_cv_int_type_$1" = "yes"; then - TL_DEF_HAVE($1, [Define if $1 type is present.]) -fi -])dnl - -dnl -dnl AC_TIMELIB_C_BIGENDIAN -dnl Replacement macro for AC_C_BIGENDIAN -dnl -AC_DEFUN([AC_TIMELIB_C_BIGENDIAN], -[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php, - [ - ac_cv_c_bigendian_php=unknown - AC_TRY_RUN( - [ -int main(void) -{ - short one = 1; - char *cp = (char *)&one; - - if (*cp == 0) { - return(0); - } else { - return(1); - } -} - ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown]) - ]) - if test $ac_cv_c_bigendian_php = yes; then - AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word]) - fi -])dnl - -dnl Check for types, sizes, etc. needed by timelib -AC_CHECK_SIZEOF(long, 8) -AC_CHECK_SIZEOF(int, 4) -TL_CHECK_INT_TYPE(int32_t) -TL_CHECK_INT_TYPE(uint32_t) - -dnl Check for headers needed by timelib -AC_CHECK_HEADERS([ \ -sys/time.h \ -sys/types.h \ -stdint.h \ -dirent.h \ -string.h \ -strings.h \ -unistd.h \ -io.h -]) - -dnl Check for strtoll, atoll -AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday) |