com php-src: Sync AC_CHECK_SIZEOF m4 macro calls: acinclude.m4 configure.ac ext/hash/config.m4 ext/ldap/config.m4 ext/mysqlnd/config-win.h ext/oc
i8/config.m4 ext/opcache/ZendAccelerator.c ext/pdo _oci/config.m4 ext/xmlrpc/libxmlrpc/acinclude.m4 ext/xmlrpc/libxmlrpc/xmlrpc.m4 main/snprintf.h
win3 2/build/config.w32.h.in

From: Date: Mon, 18 Mar 2019 01:11:23 +0000
Subject: com php-src: Sync AC_CHECK_SIZEOF m4 macro calls: acinclude.m4 configure.ac ext/hash/config.m4 ext/ldap/config.m4 ext/mysqlnd/config-win.h ext/oc
i8/config.m4 ext/opcache/ZendAccelerator.c ext/pdo _oci/config.m4 ext/xmlrpc/libxmlrpc/acinclude.m4 ext/xmlrpc/libxmlrpc/xmlrpc.m4 main/snprintf.h
win3 2/build/config.w32.h.in
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105185@lists.php.net to get a copy of this message
Commit: ccc29473ecdb07d9735e7b6361b7daeec6c3ede1 Author: Peter Kokot <peterkokot@gmail.com> Thu, 14 Mar 2019 23:21:17 +0100 Parents: b6f9ade9f201c852430689caf8ed8af0ded0159a Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ccc29473ecdb07d9735e7b6361b7daeec6c3ede1 Log: Sync AC_CHECK_SIZEOF m4 macro calls - AC_CHECK_SIZEOF is now called mostly only in PHP_CHECK_STDINT_TYPES() macro except for some parts checking for the 32 or 64 bit architecture. - SIZEOF_CHAR removed since it is always 1 - ZEND_BIN_ID is now of a more logical pattern BIN_48888 on 64bit architectures and BIN_44444 on 32bit instead of literal string BIN_SIZEOF_CHAR48888 on 64bit and BIN_SIZEOF_CHAR44444 on 32bit. The unneeded SIZEOF_CHAR part has been removed. - XMLRPC_TYPE_CHECKS removed - The long long int is the same as long long and redundant checks removed accordingly. - Removed PHP_CHECK_64BIT macro. Checking if current platform is 64bit or not can be also done simply by using a check of the long type on place. This removes redundant m4 macro PHP_CHECK_64BIT. Changed paths: M acinclude.m4 M configure.ac M ext/hash/config.m4 M ext/ldap/config.m4 M ext/mysqlnd/config-win.h M ext/oci8/config.m4 M ext/opcache/ZendAccelerator.c M ext/pdo_oci/config.m4 M ext/xmlrpc/libxmlrpc/acinclude.m4 M ext/xmlrpc/libxmlrpc/xmlrpc.m4 M main/snprintf.h M win32/build/config.w32.h.in

diff --git a/acinclude.m4 b/acinclude.m4 index 1684c74..9b32e5c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1746,25 +1746,6 @@ AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[ ]) dnl -dnl PHP_CHECK_64BIT([do if 32], [do if 64]) -dnl -dnl This macro is used to detect if we're at 64-bit platform or not. -dnl It could be useful for those external libs, that have different precompiled -dnl versions in different directories. -dnl -AC_DEFUN([PHP_CHECK_64BIT],[ - AC_CHECK_SIZEOF(long int, 4) - AC_MSG_CHECKING([checking if we're at 64-bit platform]) - if test "$ac_cv_sizeof_long_int" = "4" ; then - AC_MSG_RESULT([no]) - $1 - else - AC_MSG_RESULT([yes]) - $2 - fi -]) - -dnl dnl PHP_C_BIGENDIAN dnl dnl Replacement macro for AC_C_BIGENDIAN @@ -2601,10 +2582,11 @@ dnl dnl PHP_CHECK_STDINT_TYPES dnl AC_DEFUN([PHP_CHECK_STDINT_TYPES], [ - AC_CHECK_SIZEOF([short], 2) - AC_CHECK_SIZEOF([int], 4) - AC_CHECK_SIZEOF([long], 4) - AC_CHECK_SIZEOF([long long], 8) + AC_CHECK_SIZEOF([short]) + AC_CHECK_SIZEOF([int]) + AC_CHECK_SIZEOF([long]) + AC_CHECK_SIZEOF([long long]) + AC_CHECK_SIZEOF([size_t]) AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [ #if HAVE_STDINT_H # include <stdint.h> diff --git a/configure.ac b/configure.ac index 8fca288..67aa92b 100644 --- a/configure.ac +++ b/configure.ac @@ -507,12 +507,6 @@ PHP_MISSING_FCLOSE_DECL PHP_STRUCT_FLOCK PHP_SOCKLEN_T -AC_CHECK_SIZEOF(size_t, 8) -AC_CHECK_SIZEOF(long long, 8) -AC_CHECK_SIZEOF(long long int, 8) -AC_CHECK_SIZEOF(long, 8) -AC_CHECK_SIZEOF(int, 4) - dnl These are defined elsewhere than stdio.h PHP_CHECK_SIZEOF(intmax_t, 0) PHP_CHECK_SIZEOF(ssize_t, 8) diff --git a/ext/hash/config.m4 b/ext/hash/config.m4 index 53f57d6..0158237 100644 --- a/ext/hash/config.m4 +++ b/ext/hash/config.m4 @@ -15,20 +15,19 @@ fi AC_DEFINE(HAVE_HASH_EXT,1,[Have HASH Extension]) -AC_CHECK_SIZEOF(short, 2) -AC_CHECK_SIZEOF(int, 4) -AC_CHECK_SIZEOF(long, 4) -AC_CHECK_SIZEOF(long long, 8) - if test $ac_cv_c_bigendian_php = yes; then EXT_HASH_SHA3_SOURCES="hash_sha3.c" AC_DEFINE(HAVE_SLOW_HASH3, 1, [Define is hash3 algo is available]) AC_MSG_WARN("Use SHA3 slow implementation on bigendian") else - PHP_CHECK_64BIT([ + AC_CHECK_SIZEOF([long]) + AC_MSG_CHECKING([if we're at 64-bit platform]) + AS_IF([test "$ac_cv_sizeof_long" -eq 4],[ + AC_MSG_RESULT([no]) SHA3_DIR="sha3/generic32lc" SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-inplace32BI.c" ],[ + AC_MSG_RESULT([yes]) SHA3_DIR="sha3/generic64lc" SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-opt64.c" ]) diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4 index 8b94c06..7653bf9 100644 --- a/ext/ldap/config.m4 +++ b/ext/ldap/config.m4 @@ -16,12 +16,16 @@ AC_DEFUN([PHP_LDAP_CHECKS], [ else dnl Find Oracle Instant Client RPM header location corresponding to the given lib path e.g. for --with-ldap=/usr/lib/oracle/12.1/client64/lib - AC_CHECK_SIZEOF(long int, 4) - if test "$ac_cv_sizeof_long_int" = "4"; then + AC_CHECK_SIZEOF([long]) + AC_MSG_CHECKING([if we're at 64-bit platform]) + AS_IF([test "$ac_cv_sizeof_long" -eq 4],[ + AC_MSG_RESULT([no]) PHP_OCI8_IC_LIBDIR_SUFFIX="" - else + ],[ + AC_MSG_RESULT([yes]) PHP_OCI8_IC_LIBDIR_SUFFIX=64 - fi + ]) + OCISDKRPMINC=`echo "$1" | $SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib[/]*$!/usr/include/oracle/\1/client\2!'` dnl Check for Oracle Instant Client RPM install diff --git a/ext/mysqlnd/config-win.h b/ext/mysqlnd/config-win.h index d93b3bf..1047664 100644 --- a/ext/mysqlnd/config-win.h +++ b/ext/mysqlnd/config-win.h @@ -55,7 +55,6 @@ This file is public domain and comes with NO WARRANTY of any kind */ /* Type information */ -#define SIZEOF_CHAR 1 #define SIZEOF_LONG 4 #define SIZEOF_LONG_LONG 8 diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4 index 00a51c8..d534f09 100644 --- a/ext/oci8/config.m4 +++ b/ext/oci8/config.m4 @@ -239,18 +239,17 @@ if test "$PHP_OCI8" != "no"; then fi dnl Set some port specific directory components for use later - - AC_CHECK_SIZEOF(long int, 4) - AC_MSG_CHECKING([checking if we're on a 64-bit platform]) - if test "$ac_cv_sizeof_long_int" = "4"; then + AC_CHECK_SIZEOF([long]) + AC_MSG_CHECKING([if we're at 64-bit platform]) + AS_IF([test "$ac_cv_sizeof_long" -eq 4],[ AC_MSG_RESULT([no]) PHP_OCI8_OH_LIBDIR=lib32 PHP_OCI8_IC_LIBDIR_SUFFIX="" - else + ],[ AC_MSG_RESULT([yes]) PHP_OCI8_OH_LIBDIR=lib PHP_OCI8_IC_LIBDIR_SUFFIX=64 - fi + ]) dnl Determine if the user wants to use Oracle Instant Client libraries diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index de6b86f..73fd894 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2562,7 +2562,7 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals) accel_gen_system_id(); } -#define ZEND_BIN_ID "BIN_" ZEND_TOSTR(SIZEOF_CHAR) ZEND_TOSTR(SIZEOF_INT) ZEND_TOSTR(SIZEOF_LONG) ZEND_TOSTR(SIZEOF_SIZE_T) ZEND_TOSTR(SIZEOF_ZEND_LONG) ZEND_TOSTR(ZEND_MM_ALIGNMENT) +#define ZEND_BIN_ID "BIN_" ZEND_TOSTR(SIZEOF_INT) ZEND_TOSTR(SIZEOF_LONG) ZEND_TOSTR(SIZEOF_SIZE_T) ZEND_TOSTR(SIZEOF_ZEND_LONG) ZEND_TOSTR(ZEND_MM_ALIGNMENT) static void accel_gen_system_id(void) { diff --git a/ext/pdo_oci/config.m4 b/ext/pdo_oci/config.m4 index 12791b2..c692483 100644 --- a/ext/pdo_oci/config.m4 +++ b/ext/pdo_oci/config.m4 @@ -30,15 +30,15 @@ AC_DEFUN([AC_PDO_OCI_VERSION],[ ]) AC_DEFUN([AC_PDO_OCI_CHECK_LIB_DIR],[ - AC_CHECK_SIZEOF(long int, 4) - AC_MSG_CHECKING([if we're on a 64-bit platform]) - if test "$ac_cv_sizeof_long_int" = "4" ; then + AC_CHECK_SIZEOF([long]) + AC_MSG_CHECKING([if we're at 64-bit platform]) + AS_IF([test "$ac_cv_sizeof_long" -eq 4],[ AC_MSG_RESULT([no]) TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32" - else + ],[ AC_MSG_RESULT([yes]) TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib" - fi + ]) AC_MSG_CHECKING([OCI8 libraries dir]) if test -d "$PDO_OCI_DIR/lib" && test ! -d "$PDO_OCI_DIR/lib32"; then @@ -82,12 +82,16 @@ if test "$PHP_PDO_OCI" != "no"; then fi if test "instantclient" = "`echo $PDO_OCI_DIR | cut -d, -f1`" ; then - AC_CHECK_SIZEOF(long int, 4) - if test "$ac_cv_sizeof_long_int" = "4" ; then + AC_CHECK_SIZEOF([long]) + AC_MSG_CHECKING([if we're at 64-bit platform]) + AS_IF([test "$ac_cv_sizeof_long" -eq 4],[ + AC_MSG_RESULT([no]) PDO_OCI_CLIENT_DIR="client" - else + ],[ + AC_MSG_RESULT([yes]) PDO_OCI_CLIENT_DIR="client64" - fi + ]) + PDO_OCI_LIB_DIR="`echo $PDO_OCI_DIR | cut -d, -f2`" AC_PDO_OCI_VERSION($PDO_OCI_LIB_DIR) diff --git a/ext/xmlrpc/libxmlrpc/acinclude.m4 b/ext/xmlrpc/libxmlrpc/acinclude.m4 index 0c63d95..0b730fa 100644 --- a/ext/xmlrpc/libxmlrpc/acinclude.m4 +++ b/ext/xmlrpc/libxmlrpc/acinclude.m4 @@ -9,13 +9,3 @@ AC_CHECK_FUNCS(strtoul strtoull) AC_DEFUN([XMLRPC_HEADER_CHECKS],[ AC_CHECK_HEADERS(xmlparse.h xmltok.h strings.h) ]) - -AC_DEFUN([XMLRPC_TYPE_CHECKS],[ - -AC_REQUIRE([AC_C_INLINE]) -AC_CHECK_SIZEOF(char, 1) - -AC_CHECK_SIZEOF(int, 4) -AC_CHECK_SIZEOF(long, 4) -AC_CHECK_SIZEOF(long long, 8) -]) diff --git a/ext/xmlrpc/libxmlrpc/xmlrpc.m4 b/ext/xmlrpc/libxmlrpc/xmlrpc.m4 index 9553760..5e9552b 100644 --- a/ext/xmlrpc/libxmlrpc/xmlrpc.m4 +++ b/ext/xmlrpc/libxmlrpc/xmlrpc.m4 @@ -7,6 +7,5 @@ AC_REQUIRE([AC_PROG_RANLIB]) AC_DEFINE(UNDEF_THREADS_HACK,,[ ]) XMLRPC_HEADER_CHECKS -XMLRPC_TYPE_CHECKS XMLRPC_FUNCTION_CHECKS ]) diff --git a/main/snprintf.h b/main/snprintf.h index 56efe56..93d2034 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -136,8 +136,6 @@ typedef enum { #ifdef PHP_WIN32 # define WIDE_INT __int64 -#elif SIZEOF_LONG_LONG_INT -# define WIDE_INT long long int #elif SIZEOF_LONG_LONG # define WIDE_INT long long #else diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index b2d944c..938af69 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -109,7 +109,6 @@ #define SIZEOF_INT 4 #define SIZEOF_LONG 4 /* MSVC.6/NET don't allow 'long long' or know 'intmax_t' */ -#define SIZEOF_LONG_LONG_INT 0 #define SIZEOF_LONG_LONG 8 /* defined as __int64 */ #define SIZEOF_INTMAX_T 0 #define ssize_t SSIZE_T
« previous php.cvs (#105185) next »