* Autotools: Refactor AVX-512 checks
- CS synced
- checks wrapped in AC_CACHE_CHECK
- CPP macros PHP_HAVE_AVX512_SUPPORTS and PHP_HAVE_AVX512_VBMI_SUPPORTS
are now either defined to 1 or undefined to avoid manual defining on
Windows (previously they should be either 0 or 1)
* [skip ci] Add basic macros help texts
When configuring PHP with:
./configure --with-valgrind and --enable-address-sanitizer
configuration now errors now since these two are not compatible
configurations.
As of Visual Studio 2015, the major version of the compiler (`cl.exe`)
is 19, and the minor version increases by steps of 10. However, the
latest Visual Studio 2022 release has the version `19.40`, so that
Visual Studio version is not properly detected. This is not a big deal
regarding the reported compiler version (`php -v` etc.), but the
filenames of the builds would no longer match the expectations (instead
of `vs17` there is now `19.40.33811` or another build number). This
implies that the files would have to be renamed manually to be properly
handled by windows.php.net (or that code would have to be adapted).
Therefore we update the version detection to detect all versions < 1950
as Visual Studio 2022, assuming that "For major releases, the minor
version increases by 10."[1] still holds in the future.
[1] <https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170#visual-studio-2017-and-later>
The strptime, where available, needs the _GNU_SOURCE defined or compiler
flag -std=gnuXX appended to be declared in time.h. PHP's strptime is
also deprecated as of PHP 8.1.
This removes the HAVE_STRPTIME_DECL_FAILS in favor of a simpler
AC_CHECK_DECL check and HAVE_DECL_STRPTIME CPP macro.
This broke in 6318040df2 when phpdbg
stopped using its custom printing routines. By relying on standard
printing routines, the embedded NUL bytes are causing the strings to be
cut off, even when using %.*s. Solve this by going straight to the
output routine, which is what the printf routine would've done anyway.
Closes GH-14822.
* PHP-8.3:
NEWS for GH-14814
ext/standard/tests: strings/wordwrap_memory_limit_32bit.phpt has two outputs
ext/standard/tests: 32bit wordwrap tests aren't just for Windows
* PHP-8.2:
NEWS for GH-14814
ext/standard/tests: strings/wordwrap_memory_limit_32bit.phpt has two outputs
ext/standard/tests: 32bit wordwrap tests aren't just for Windows
It turns out that on a 32-bit system, this test can produce either the
"usual" expected output from the 64-bit test, OR the 32-bit-only
integer overflow message. We copy the dual expected outputs from
chunk_split_variation1_32bit.phpt to handle both cases.
This fixes an earlier commit that split the two tests based only on
the size of an int (32-bit versus 64-bit). The CI reveals that, at
least on a debug/zts build, the "64-bit" memory limit error (and not
the integer overflow error) is still produced.
The test in strings/wordwrap_memory_limit.phpt has a counterpart in
strings/wordwrap_memory_limit_win32.phpt. The two are conditional on
both the OS name and the size of an int (32- versus 64-bits).
A Gentoo Linux user has however reported that the 64-bit test fails on
a 32-bit system, with precisely the error message that the "win32"
test is expecting. I don't have any 32-bit hardware to test myself,
but I think it's reasonable to conclude that the OS name is not an
essential part of the test: it's simply 32- versus 64-bit.
This commit drops the conditionals for the OS name. Now one test will
be run on 32-bit systems, and the other on 64-bit systems, regardless
of the OS name.
Bug: https://bugs.gentoo.org/935382
When building pdo_mysql, pdo_pgsql, or pdo_sqlite with phpize from
the downloaded PHP 8.4 archive, also pdo_sql_parser.h and
php_pdo_int.h need to be installed.