Follow-up of GH-15230:
- Redundant variables removed
- Redundant duplicate middle newlines removed
- PHP_CXX_COMPILE_STDCXX macro arguments quoted
- When extension is built as shared the PHP_ADD_SOURCES works
differently, and PHP_ADD_SOURCES_X needs to be used so this can be
used:
./configure --with-pdo-firebird=shared
With 04a67cd86c the list of source files
are now added alphabetically. Previously the phpdbg_parser.c was added
before the phpdbg_lexer.c. Which caused the
"sapi/phpdbg/phpdbg_lexer.l:8:10: fatal error: 'phpdbg_parser.h' file
not found" error.
To make the order of source files irrelevant, the Makefile substitutions
needs to be fixed - the 3rd argument of PHP_ADD_MAKEFILE_FRAGMENT macro,
which is the substitution of the $(builddir) Make variable. The
$(builddir)/phpdbg_lexer.lo was previously substituted to an absolute
path. And the relative should be used, for Make to be able to find the
dependent target.
targetted for socket_create_pair/socket_create, they re not considered
as socket type but to be ORed with these (to avoid socketpair2/socket2
likely), set O_CLOEXEC/O_NONBLOCK respectively on the file descriptors.
close GH-15322
* Show build provider information in "php -v"
Vendors such as distributions can set the `PHP_BUILD_PROVIDER`
variable, that gets printed in phpinfo. However, I find that users check
`php -v` more often than phpinfo to see what PHP they're running. The
problem with this is that it does not show that build provider
information.
This change makes the build provider information printed on an
additional line of the version information.
* Put on same line so it works with or without env var
Unbreaks build without PHP_BUILD_PROVIDER set.
* change wording in provider version text
better grammatically; many different possibilities here though
* Unify SAPI version printing
This makes it so that all of the SAPIs share the same code for printing
version information. This is useful in case of any future changes to the
version information, such as i.e. adding build provider to the output.
* Make include for php_print_version explicit
* Preserve phpdbg version and output channel
php_printf doesn't have same semantics, as phpdbg_out could be on a
different output than stdout/err. Also add the phpdbg version (in case
it differs from PHP's, to keep similar output before this PR)
* remove size variables
we don't use them and CI doesn't like unused variables
* Fix format string insecurity
As a follow-up to the commit which introduced support for Firebird 4.0+
data types[1], we add support for formats for types with time zones.
Since this uses the newer Firebird C++ API, pdo_firebird now requires a
C++ compiler to be built.
[1] <https://github.com/php/php-src/pull/14897>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Closes GH-15230.
Using a newer fbclient version with an older server is generally
supported, and as such we must not only skip these tests for older
fbclients, but also for older servers.
In lack of some readily available function, we're querying the server
to find its version.
- Obsolete PHP_* variables checks removed (there was once the 'pdf'
extension bundled in PHP that also had the same --with-*-dir configure
options (3be17e3f26). When combined with
the gd extension, options need to be executed conditionally; first one
won), this is no longer relevant neither recommended practice to
duplicate configure options inside the php-src context. Ideally,
all configure options should be prefixed with an extension namespace
--with-<extension-name>-<option> to be unique.
- AS_* macros used
Git 2.46.0 accidentally broke git diff --exit-code for files flagged with -diff.
Add the -a flag to restore the previous behavior. This issue is already fixed in
gits next branch.
This intends to supersede the two following PRs:
- #12000 because it does not modify the stub file, but only update the
arginfo file. It also proposes to merge to GA branches, and is
currently marked as Requires RM Approval.
- #12543 Essentially the same as this PR and from the same author, as
this, but its about a year old and requires rebasing anyway.
This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY`
constants on relevant versions (7.66 and 7.88 respectively).
It is possible to use HTTP/3 without having these constants declared,
but having them declared in PHP makes things more approachable and
"official".
This uses AS_* macros and checks for an iconv implementation in a single
cache check block for easier configure log output and possible future
adjustments when iconv is built-in the C library (like on Alpine and
some other systems where it isn't recognized as such yet exactly).
This syncs few minor left-overs in "Autotools" related files:
- redundant middle newlines removed (in man pages the duplicate newlines
are also ignored and are not visible in the man page anyway)
- Minor mixed indentation synced
[skip ci]
The pcre is a required dependency in fileinfo extenstion. This marks it
as a configure step dependency for consistency with other extensions
and to have extensions properly sorted in the generated
internal_functions* files.
Follow-up of GH-15344 (687eb9125a)
This removes the customized error messages in PDO extensions when PDO is
not enabled (--disable-all or --disable-pdo) in favor of the default
error done by PHP_ADD_EXTENSION_DEP.
- ext/dom
- ext/xsl
These use the PHP_ADD_EXTENSION_DEP macro which throws error when one of
the dependencies is disabled or not configured properly.
For example:
./configure --disable-all --enable-dom
or
./configure --disable-all --with-xsl
Will throw default PHP dependency error info, when using
PHP_ADD_EXTENSION_DEP.
These errors were once done when PHP_ADD_EXTENSION_DEP macro wasn't yet
available.
- AC_CHECK_TYPE long list of arguments split into a newline
- Long lists in AC_CHECK_DECLS can be split across multiple lines, even
without m4_normalize, but the end quote needs to be done properly
after the last item without space or newline. Here the m4_normalize
ensures all trailing blanks are trimmed and having the possibility to
put the ending quotes on newlines also
- AS_* macros used
- Overquoted AC_RUN_IFELSE macros arguments reduced
- Redundant double quoted single variables assignments removed
- i*86 and x86* patterns joined into a single case
- Scattered if blocks moved together as PDO_MYSQL_UNIX_ADDR is defined
only when mysql_config is available
- Obsolete backticks command substitutions `...` replaced with the
recommended $(...)