Anatol Belski [Wed, 28 Mar 2018 16:00:28 +0000 (18:00 +0200)]
Fixed bug #76153 Intl compilation fails with icu4c 61.1
Additionally, ICU >= 59.1 requires C++11, so add the flags. Some
refactoring is needed to comply with the latest recommended build
options, such as automatic icu namespace addition.
solotandem [Mon, 26 Feb 2018 16:24:25 +0000 (10:24 -0600)]
Be consistent in is_executable on a directory in any stream wrapper.
Current code treats the 'local files' stream wrapper ('php_plain_files_wrapper')
different than all other stream wrappers. For the 'local' stream wrapper,
is_executable only checks the mode key in the filestat array on the file or
directory in question. For other stream wrappers, is_executable always returns
FALSE on a directory. This treatment is inconsistent on its face.
Also, for a custom stream wrapper that also points to local files, the result
of is_executable is always FALSE even though it may be TRUE if the function were
called on the same item using the 'local' stream wrapper from PHP.
NOTE: patch does not attempt to add a test for this as there are no tests of
is_executable for stream wrappers.
Implement #51368: php_filter_float does not allow custom thousand separators
A set of hard-coded thousand separator characters (presently, `',.`) is
somewhat limited (users may prefer other separators, such as spaces or
underscores), as well as somewhat too liberal (arbitrary combinations
of different thousand separators are presently possible). Therefore we
introduce a `thousand` option analogous to `decimal`, which allows to
define the desired thousand separators as non-empty string, defaulting
to `',.`. While we easily could support empty strings here as well,
that would not make much sense, since this behavior can more easily be
accomplished by not setting the `FILTER_FLAG_ALLOW_THOUSAND` flag in
the first place.
Michael Heimpold [Wed, 14 Feb 2018 13:46:17 +0000 (14:46 +0100)]
Fixed bug #75722: Rework valgrind detection
As described in bug report #75722, the configure script (acinclude.m4)
currently searches for the valgrind header file and enables valgrind
support if found.
When cross-compiling the searched paths are invalid for the target
platform because they belong to the host system. At the moment, there is
no way to tell the build system a dedicated path where to look for the
header file.
This leads to the issue, that when cross-compiling eg. for ARMv5 platform,
that valgrind header file is detected - e.g. because host system is amd64 -
and support is enabled - but target platform will never support valgrind
(valgrind requires e.g. at least ARMv7).
This change reworks the detection so that user could manually opt-in
valgrind support and optionally specify a directory where the build system
should look for the header file using the --with-valgrind option.
Gabriel Caruso [Tue, 27 Feb 2018 05:05:31 +0000 (02:05 -0300)]
Small improvements to run-tests
* substr instead of preg_match
* cast instead of settype
* remove $borked and check if $bork_info isn't null to report borked
tests
* remove some error control operators
Thomas Petazzoni [Mon, 26 Feb 2018 18:30:55 +0000 (19:30 +0100)]
main/php_ini.c: build empty php_load_zend_extension_cb() when !HAVE_LIBDL
Commit 0782a7fc6314c8bd3cbfd57f12d0479bf9cc8dc7 ("Fixed bug #74866
extension_dir = "./ext" now use current directory for base") modified
the php_load_zend_extension_cb() function to use php_load_shlib(), and
pass a handle to the newly introduced zend_load_extension_handle()
function instead of passing the extension path to
zend_load_extension().
While doing so, it introduced a call to php_load_shlib() from code
that is built even when HAVE_LIBDL is not defined. However,
php_load_shlib() is not implemented when HAVE_LIBDL is not defined,
for obvious reasons.
It turns out that zend_load_extension_handle() anyway doesn't do
anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and
ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined
(Zend/zend_portability.h).
Fixes the following build failure when building on a system that
doesn't have libdl:
main/php_ini.o: In function `php_load_zend_extension_cb':
php_ini.c:(.text+0x478): undefined reference to `php_load_shlib'
php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib'
collect2: error: ld returned 1 exit status
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Fix #76113: mbstring does not build with Oniguruma 6.8.1
As of Oniguruma 6.8.1, the regex structure has been moved from the
public `oniguruma.h` to the private `regint.h`. Thus, it is no longer
possible to directly access the struct's members, and actually, there
is no need to, since there are respective accessor functions available
at least of 2.3.1.