Fix #77944: Wrong meta pdo_type for bigint on LLP64
When actually fetching the data, bigint (unsigned) column values are
returned as integers on LLP64 architectures, so their pdo_type has to
be PDO::PARAM_INT accordingly.
Add --enable-werror configure option and use it on Travis. It's not
possible to directly use CFLAGS, because it also affects configure
checks which often throw warnings.
We can't enable something similar for Windows builds at this time,
because they throw a lot more warnings.
We must not (try to) modify shared values, but rather have to use our
own copies, if unixified filenames are required on Windows. To avoid
excessive string duplication, we add checks whether the filenames are
already unixified (i.e. do not contain backslashes). To improve the
performance if we need to copy strings, we use do_alloca() and friends.
Besides generally being somewhat messy, the handling of unixified
filenames is still suboptimal performance-wise, but we leave this for a
future cleanup, and focus on fixing the issue at hand for now.
We also enable opcache.protect_memory for the AppVeyor CI.
Peter Kokot [Tue, 12 Mar 2019 23:25:07 +0000 (00:25 +0100)]
Move acinclude.m4 to build/php.m4
The acinclude.m4 file is in a usual Autotools build processed with
Automake's aclocal tool. Since PHP currently doesn't use Automake and
aclocal this file can be moved into the build directory. PHP build
system currently generates a combined aclocal.m4 file that Autoconf
can processes automatically.
However, a newer practice is writing all local macros in separate
dedicated files prefixed with package name, in PHP's case PHP_MACRO_NAME
and putting them in a common `m4` directory. PHP uses currently `build`
directory for this purpose.
Name `php.m4` probably most resembles such file for PHP's case.
PHP manually created the aclocal.m4 file from acinclude.m4 and
build/libtool.m4. Which is also not a particularly good practice [1], so
this patch also removes the generated alocal.m4 usage and uses
m4_include() calls manually in the configure.ac and phpize.m4 files
manually.
- sort order is not important but can be alphabetical
- list of *.m4 files prerequisites for configure script generation
updated
- Moving m4_include() before AC_INIT also removes all comments starting
with hash character (`#`) in the included files.
Peter Kokot [Mon, 22 Apr 2019 22:20:50 +0000 (00:20 +0200)]
Simplify libxmlrpc bundling and building
The xmlrpc library is a forked, modified and bundled into the PHP source
code. Instead of having a separate *nix build system files in the xmlrpc
library this patch removes unneeded build checks.
- AC_PROG_CC is not needed to be called by the extension itself since it
is already part of the main configure.ac and the phpize's
configure.ac.
- UNDEF_THREADS_HACK is not used in the current codebase.
- Symbols defined by XMLRPC_HEADER_CHECKS are not used in the current
code.
- Symbols defined by XMLRPC_FUNCTION_CHECKS are not used in the current
code.
- AC_PROG_RANLIB is already done by the TSRM's files and isn't needed
for the xmlrpc extension to work.
- AC_PROG_LN_S is already done by the PHP main configure.ac and also
isn't needed by the xmlrpc extension to be built.
Peter Kokot [Sat, 20 Apr 2019 22:21:14 +0000 (00:21 +0200)]
Refactor Zend/acinclude.m4 local macro
There is now only a single M4 macro in the legacy acinclude.m4 file. A
separate acinclude file was once used with a standalone Zend engine
building but with current build system this can be simplified a bit.
- [date_timestamp_get] adding coverage for date_timestamp_get alias to
DateTime::getTimestamp feature at PHPRio TestFest
- [date_timestamp_get] adding coverage for date_timestamp_get basic
feature at PHPRio TestFest
- Combine tests into single file
Peter Kokot [Sat, 20 Apr 2019 17:00:51 +0000 (19:00 +0200)]
Fix #77921: static.php.net doesn't work anymore
This embeds the PHP logo image in the FPM status HTML page instead of
using remote location. The phpinfo() output also uses such approach
and browser compatibility looks decent [1].
Peter Kokot [Sat, 20 Apr 2019 14:12:54 +0000 (16:12 +0200)]
Remove PHP_SETUP_KERBEROS m4 macro
With recent transition to pkg-config/pkgconf this macro has been now a
simple wrapper for PKG_CHECK_MODULES and PHP_EVAL_INCLINE so it's better
to omit it altogether and use these two in the *.m4 code directly.
It looks like we can't access EG(current_module) here in ZTS builds.
As the problematic asserts have now been disabled outside RC_DEBUG,
I'm just reverting this commit and leaving things as they were.
Compile the zend_test extension as shared and try loading it with dl()
to test for obvious issues. Doing this as a standalone call because this
is very specific to the CI setup.
FOREACH_END_DEL() does not call the destructor by itself, we need to
explicitly call it. Due to the missing dtor call the functions were
not unregistered early, which resulted in later shutdown segfaults.
Peter Kokot [Tue, 16 Apr 2019 22:09:36 +0000 (00:09 +0200)]
Join build makefiles together
Changes:
- Joins build/build.mk and build/build2.mk files together since there
isn't any practical reason for having two different files with the
current build system.
- Makefile is now more portable. All special syntaxes are omitted, for
example, a conditional assignment operators `?=`. This makes buildconf
more useful on Solaris make derivative, so there is no longer need to
override make with gmake: `MAKE=gmake ./buildconf`.
- Suppressing autoconf and autoheader warnings is not needed anymore
with current build system. Instead, the option `-Wall` has been used
when running `./buildconf --debug` to get more useful debug info
about current M4.