Commit Graph

578 Commits

Author SHA1 Message Date
Peter Kokot
f75143cc0a
Remove unused symbol ZEND_FIBER_ASM (#13467)
The symbol ZEND_FIBER_ASM is not defined on Windows and not used around
the ecosystem.
2024-02-22 13:44:04 +01:00
Peter Kokot
e72f0c887b
Simplify prctl and procctl Autoconf checks (#13450)
The AC_CHECK_FUNCS checks whether the linker sees the function in the
usual libraries, in this case libc. This is a simple trick to also check
existence of belonging headers, since the code uses HAVE_PRCTL and
HAVE_PROCCTL to include headers and call functions.
2024-02-21 09:04:37 +01:00
Jorg Adam Sowa
e630aacf79
Remove HAVE_INET_PTON (#13410) 2024-02-21 00:43:56 +00:00
Peter Kokot
847c7459eb
Remove Autoconf check for C99 header stdint.h (#13444)
This removes the redundant check that defines the HAVE_STDINT_H symbol,
which is used in the ext/date/lib and ext/fileinfo/libmagic but on both
places patches and other header files take care of this so it is always
included unconditionally in php-src.

Autoconf by default still automatically checks for stdint.h internally
in current versions, so for now the HAVE_STDINT_H symbol is still
defined in php_config.h and will be made redundant along the way.
2024-02-20 20:19:28 +01:00
Peter Kokot
b41a5023f9
Remove malloc.h (#13436)
This removes the deprecated malloc.h header Autoconf check on *nix
systems and its HAVE_MALLOC_H symbol. It can be replaced mostly with the
stdlib.h. The libgd usptream also doesn't include it anymore.

On Windows, it is still used for some memory allocation functions, but
can be replaced with stdlib.h in the future.
2024-02-20 18:02:54 +01:00
Peter Kokot
25923987b5
Refactor PHP_SOCKADDR_CHECKS (#13406)
Instead of the project macro, the sockaddr_storage and sockaddr.sa_len
can be checked with the AC_CHECK_TYPES and AC_CHECK_MEMBERS by including
the sys/socket.h. Some systems (~1988) didn't include the sys/types.h in
the socket.h (obsolete on current systems).

These macros by default define the HAVE_STRUCT_SOCKADDR_STORAGE and
HAVE_STRUCT_SOCKADDR_SA_LEN.
2024-02-16 13:29:20 +01:00
Peter Kokot
9588796294
Use AC_CHECK_TYPES for checking struct flock (#13397)
The struct flock is defined in fcntl.h, if system has it. This removes
redundant PHP_STRUCT_FLOCK M4 macro in favor of the AC_CHECK_TYPES,
which by default defines symbol HAVE_STRUCT_FLOCK.
2024-02-15 19:17:01 +01:00
Peter Kokot
eb76a83008
Remove PHP atomic includes and PHP_DEFINE M4 macro (#13372)
PHP_DEFINE was introduced with the PHP 5 build system
9d9d39a0de and then refactored via
350de12bc2.

This was once used to put defined constants into a single file to have
more fine-graned dependencies (atomic includes). Since no known PHP
extension is using this and it makes very little sense to use this, this
M4 macro can be removed in favor of the Autoconf native way using
AC_DEFINE and the usual included files php_config.h and config.h.

- Generated unused include directory removed
- Remove include dir from DEFS
- Remove also include dir from PDO checks
2024-02-11 22:14:46 +01:00
Peter Kokot
41e3044f48
Remove obsolete check for missing fclose declaration (#13360)
SunOS 4.1.4 from 1994 didn't have fclose declared in standard header
stdio.h. This doesn't need to be checked anymore, as fclose is part of
the C89+ standard and declaration is present on Solaris 10 (SunOS 5.10)
and later.
2024-02-09 18:11:49 +00:00
Derick Rethans
a4d64b2605
Removed ext/oci8 and ext/pdo_oci (#13327)
* Removed ext/oci8 and ext/pdo_oci

They now live in their own repositories:

https://github.com/php/pecl-database-oci8
https://github.com/php/pecl-database-pdo_oci

As per: https://wiki.php.net/rfc/unbundle_imap_pspell_oci8
2024-02-07 15:34:39 +00:00
Ilija Tovilo
631bc81607
Implement stackless internal function calls
Co-authored-by: Dmitry Stogov <dmitry@zend.com>

Closes GH-12461
2024-02-06 17:42:28 +01:00
Eric Mann
5094a636ae
PHP-8.3 is now for PHP-8.3.4-dev 2024-01-30 12:42:45 -08:00
Pierrick Charron
0454f4ade4
PHP-8.2 is now for PHP 8.2.17-dev 2024-01-30 12:43:37 -05:00
Peter Kokot
ad9250183f
Remove obsolete _XPG_IV preprocessor directive (#13035)
This was once used on SINIX UNIX variant and MIPS processors with the
last release in 1995 to have working gettimeofday().
2024-01-11 10:54:13 +01:00
Peter Kokot
64751a0df0 Merge branch 'PHP-8.3'
* PHP-8.3:
  Set libtool tag per command instead of global one
2024-01-10 09:17:48 +01:00
Peter Kokot
04954f6b2c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Set libtool tag per command instead of global one
2024-01-10 09:13:39 +01:00
Jan Palus
d57a7767a2 Set libtool tag per command instead of global one
Global --tag=CC defined in configure.ac is not correct in all cases. For example
linking objects that were compiled from C++ sources needs to be done with C++
compiler, however for link mode libtool will prefer compiler indicated with
--tag.

Fixes GH-12349
2024-01-10 09:09:45 +01:00
Peter Kokot
6f3888fe9a
Remove root library check for dlopen() and dlsym() (#13086)
The root library was added here for the Haiku system, to check dlopen()
and dlsym(). However, the root library is already explicitly linked in
the system, and it does not need to be checked neither linked anymore,
since at least ~2013.
2024-01-07 10:07:17 +01:00
Peter Kokot
22ec2585a1
Omit HAVE_INET_NTOP definition with AC_CHECK_FUNC (#13073)
Following the bb1109d9f1 this now doesn't
define the unused symbol HAVE_INET_NTOP also in Autotools build system.
2024-01-05 19:41:54 +01:00
Peter Kokot
2caa2fe00d
Remove libbind from build system (#12991)
Linking with -lbind is no longer relevant. The libbind was once part of
the ISC project bind9. In 2013, maintenance was moved to NetBSD which
integrated it into netresolv.

[1]: https://www.isc.org/othersoftware/#libbind
[2]: https://wiki.netbsd.org/individual-software-releases/netresolv/
2024-01-04 19:23:46 +01:00
Jakub Zelenka
d33a534863
PHP-8.3 is now for PHP-8.3.3-dev 2024-01-02 15:50:36 +00:00
Peter Kokot
3164a9effb
Remove unused in_addr_t type alias (#12994)
The fastcgi code was refactored in
18cf4e0a8a and in_addr_t is no longer
used. The PHP_CHECK_IN_ADDR_T is also obsolete and not recommended way
to discover availability of the type. If needed in the future, the
AC_CHECK_TYPES can be used instead.
2024-01-02 16:41:33 +01:00
Sergey Panteleev
5d79c1b74d
PHP-8.2 is now for PHP 8.2.16-dev 2024-01-02 16:42:14 +03:00
Peter Kokot
907b07822c Merge branch 'PHP-8.3'
* PHP-8.3:
  Add cross-compiling 3rd argument to AC_RUN_IFELSE
2023-12-22 16:35:40 +01:00
Peter Kokot
71e002b38e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add cross-compiling 3rd argument to AC_RUN_IFELSE
2023-12-22 16:34:42 +01:00
Peter Kokot
de5557b02f Add cross-compiling 3rd argument to AC_RUN_IFELSE
Autotools emits warning if 3rd argument is empty. Call is wrapped in the
AC_CACHE_CHECK with php_cv_* cache variable name according to the docs.

Closes GH-12966
2023-12-22 16:24:40 +01:00
Cristian Rodríguez
927adfb1a6
Use a single version of mempcpy(3) (#12257)
While __php_mempcpy is only used by ext/standard/crypt_sha*, the
mempcpy "pattern" is used everywhere.

This commit removes __php_mempcpy, adds zend_mempcpy and transforms
open-coded parts into function calls.
2023-12-20 15:16:32 +00:00
Thomas Hurst
b90c9ca7db Enable ifunc checks on FreeBSD 12+
This was disabled in 2019 due to problems reported in FreeBSD 11. The original
report (PHP bug 77284) includes a comment that FreeBSD 12 worked - which also
happens to be the first version ifunc use appeared in libc.

Close GH-12288
2023-12-11 09:07:28 +00:00
David CARLIER
09838f17cb
zend_call_stack support proposal for solaris/illumos. (#12862) 2023-12-09 14:19:07 +00:00
Pierrick Charron
dc3641ea0f
PHP-8.2 is now for PHP 8.2.15-dev 2023-12-05 15:01:08 -05:00
Eric Mann
1fdf21fe84
PHP-8.3 is now for PHP 8.3.2-dev 2023-12-05 07:56:55 -08:00
Peter Kokot
40d1442cec
Remove unused gcov artifacts (#12786) 2023-11-27 02:07:05 +00:00
Peter Kokot
3665e90061
Remove unused PHP_COMPILE and CXX_PHP_COMPILE variables (#12760)
These were part of the old build system and are no longer used.
2023-11-24 01:35:24 +00:00
Peter Kokot
5140889c92
Remove unused build variables (#12746)
- LFLAGS
- PHP_LIBS
- SHARED_LIBTOOL
- EXT_LIBS

These were part of the build system in the past and are no longer used
in current code.
2023-11-22 19:15:30 +01:00
Jakub Zelenka
178d3acf4c
PHP 8.3 is now 8.3.1-dev 2023-11-21 14:54:52 +00:00
Peter Kokot
7d52f39954
Remove redundant PHP_SUBST_OLD(INCLUDE_PATH) (#12738)
The AC_SUBST(INCLUDE_PATH) is enough to only replace the variable in the
build-defs.h.in file.
2023-11-21 02:56:36 +00:00
Peter Kokot
77ea5c5691
Remove obsolescent AC_TYPE_SIZE_T (#12719)
The macro checks for existence of size_t in <stddef.h> otherwise it sets
it to 'unsigned int'. The size_t is part of C89 standard and all
platforms should have it. Macro is also marked to be made obsolete in
the future versions of Autoconf.

At this point there is still AC_FUNC_ALLOCA in PHP's configure.ac which
uses AC_TYPE_SIZE_T under the hood so the check is still done there in
the meantime.
2023-11-19 06:57:22 +00:00
Peter Kokot
a35a69ff0f
Clean duplicate headers check (#12710)
- AC_CHECK_HEADERS already includes the header(s) listed in the first
  argument, so additional net/if.h is redundant.
- The crypt.h is checked two times and HAVE_CRYPT_H is only needed in
  ext/standard.
- Remove duplicate <string.h> in ext/standard
- Remove duplicate <string.h> in getaddrinfo check in configure.ac
2023-11-18 04:20:36 +00:00
Peter Kokot
a6d5f3461b
Remove obsolete DG/UX check (#12713)
DG/UX is a discontinued Unix OS, the support for which ended in 2001.
2023-11-18 04:18:26 +00:00
David CARLIER
931a8b0739
inet_ntop requirement check at configure time instead (#12700) 2023-11-17 16:01:46 +00:00
Ilija Tovilo
a785b2fac0
Merge branch 'PHP-8.3'
* PHP-8.3:
  Disable -fsanitize=function on Clang 17
2023-11-11 21:11:08 +01:00
Ilija Tovilo
d5a25d51fc
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disable -fsanitize=function on Clang 17
2023-11-11 21:11:02 +01:00
Ilija Tovilo
ca22505c8c
Disable -fsanitize=function on Clang 17
Closes GH-12642
2023-11-11 21:09:45 +01:00
Sergey Panteleev
239a26fa90
PHP-8.2 is now for PHP 8.2.14-dev 2023-11-07 17:12:19 +03:00
David Carlier
44f9c226aa following-up on GH-12551: removing inet_ntoa usage
Close GH-12554
2023-11-06 12:05:56 +00:00
Peter Kokot
7d485aa628
ext/sockets: Clean header checks (#12607)
- Unused header checks removed:
  HAVE_NETINET_TCP_H and HAVE_SYS_UN_H are not used in the code.
- Duplicate linux/filter.h check removed:
  HAVE_LINUX_FILTER_H is already defined in ext/sockets.
2023-11-04 15:12:16 +00:00
Ilija Tovilo
2efe366af6
Add zend_worklist.h to PHP_INSTALL_HEADERS (#12571)
Fixes GH-12565
2023-10-30 19:37:27 +01:00
Pierrick Charron
2642a08697
PHP-8.2 is now for PHP 8.2.13-dev 2023-10-10 11:45:26 -04:00
Ilija Tovilo
62e2402534
Use autoconf for recognizing __builtin_unreachable() (#12266)
Older versions of GCC don't support __has_builtin(), but do support
__builtin_unreachable().
2023-09-22 11:53:09 +02:00
Sergey Panteleev
5c1f746716
PHP-8.2 is now for PHP 8.2.12-dev 2023-09-12 14:53:56 +03:00
Jakub Zelenka
7deb84b7a6
Start PHP 8.4 development cycle 2023-08-29 17:19:01 +01:00
Peter Kokot
1413787884 Merge branch 'PHP-8.2'
* PHP-8.2:
  On riscv64 require libatomic if actually needed
2023-08-28 19:48:49 +02:00
Peter Kokot
a1043fe051 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  On riscv64 require libatomic if actually needed
2023-08-28 19:47:44 +02:00
Jeremie Courreges-Anglas
bf3fb4e5c9 On riscv64 require libatomic if actually needed
clang and newer gcc releases support byte-sized atomic accesses on
riscv64 through inline builtins.  In both cases the hard dependency on
libatomic added by GH-11321 isn't useful.

Stop using AC_CHECK_LIB() which is too naive to notice that libatomic
isn't needed.  Instead, PHP_CHECK_FUNC() will retry the check with -latomic
if required.

Closes GH-11790
2023-08-28 19:47:19 +02:00
Pierrick Charron
4467f33e89
PHP-8.2 is now for PHP 8.2.11-dev 2023-08-15 16:08:52 -04:00
Patrick Allaert
6e3f93f2f8
PHP-8.1 is now for PHP 8.1.24-dev 2023-08-15 21:09:58 +02:00
David CARLIER
3e315df6f8 Merge branch 'PHP-8.2' 2023-08-07 19:02:55 +01:00
David CARLIER
e9e5b4c1c8 Merge branch 'PHP-8.1' into PHP-8.2 2023-08-07 19:02:44 +01:00
Kévin Dunglas
96885bc04f fix: handle the GNU specific version of strerror_r
Close GH-11882
2023-08-07 19:01:24 +01:00
Peter Kokot
37d35f5ed8
Move --enable/--disable-fiber-asm help output (#11827)
This moves the fiber configure option in the Zend section. TSRM doesn't
currently have any specific configure options so it can be removed from
the ./configure --help output.
2023-07-31 15:29:14 +01:00
Peter Kokot
b132b7ab7e
Remove check for time.h and HAVE_TIME_H (#11726)
The `<time.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

The conditional include based on Windows is there so the win32/time.h
can be included on other places when needed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2023-07-20 09:38:53 +02:00
Athos Ribeiro
d35df89c35 Fix #79026: Allow PHP_EXTRA_VERSION overrides
When building from sources, someone distributing PHP may want to add a
vendor specific string to the PHP_VERSION so users can differentiate
multiple vendor builds from the same PHP version. For instance, a vendor
backporting a bug fix to a no-longer-supported PHP version could extend
their PHP_EXTRA_VERSION to allow their users to identify that they carry
such fix by checking their PHP_VERSION.

Closes GH-11706
2023-07-19 12:14:42 +02:00
Ben Ramsey
6e3c520f51
PHP-8.1 is now for PHP-8.1.23-dev 2023-07-18 16:30:49 -05:00
Sergey Panteleev
796a75f967
PHP-8.2 is now for PHP 8.2.10-dev 2023-07-18 14:02:43 +03:00
Arnaud Le Blanc
d0731934b7
Expose time spent collecting cycles in gc_status() (#11523) 2023-07-16 12:34:28 +02:00
Ben Ramsey
097b08cbbe
Merge branch 'PHP-8.1' into PHP-8.2 2023-07-10 09:26:17 -05:00
Peter Kokot
41a3573fcc
Fix GH-9483: Autoconf warnings for newer Autoconf versions
Co-authored-by: Levi Morrison <morrison.levi@gmail.com>
2023-07-10 09:25:58 -05:00
Peter Kokot
cf587c1a1b
Fix GH-11603: Set LDFLAGS (#11605)
The two unsets before the last `unset LIBS LDFLAGS` are not necessary so
LDFLAGS can be adjusted via command line:

LDFLAGS="..." ./configure

Co-authored-by: Max Kellermann <max.kellermann@ionos.com>
2023-07-07 03:30:56 +01:00
Sergey Panteleev
884a53f39a
PHP-8.2 is now for PHP 8.2.9-dev 2023-06-20 17:25:30 +03:00
Patrick Allaert
6c4b1e0417
PHP-8.1 is now for PHP 8.1.22-dev 2023-06-20 16:07:05 +02:00
David Carlier
2e4369a171 Merge branch 'PHP-8.2' 2023-05-27 16:38:46 +01:00
David Carlier
350e449bd8 Merge branch 'PHP-8.1' into PHP-8.2 2023-05-27 16:37:48 +01:00
Daniil Gentili
1dfa277a96 Fix GCC 12 compilation on riscv64
Close GH-11321
2023-05-27 16:37:19 +01:00
Ben Ramsey
2f2fd06be0
PHP-8.1 is now for PHP 8.1.21-dev 2023-05-23 16:19:16 -05:00
Pierrick Charron
d5f68b50fc
PHP-8.2 is now for PHP 8.2.8-dev 2023-05-23 16:56:58 -04:00
Sergey Panteleev
8318f4a6b1
PHP-8.2 is now for PHP 8.2.7-dev 2023-04-25 18:33:13 +03:00
Patrick Allaert
725f136f9a
PHP-8.1 is now for PHP 8.1.20-dev 2023-04-25 16:18:30 +02:00
Dmitry Stogov
c9d728cbd6 Revert "Zend/zend_types.h: move zend_rc_debug to zend_rc_debug.h"
This reverts commit d6e95041e2.
2023-04-04 22:48:26 +03:00
Ben Ramsey
d9df750b22
PHP-8.1 is now for PHP 8.1.19-dev 2023-03-29 19:51:20 -05:00
Pierrick Charron
f7c692a940
PHP-8.2 is now for PHP 8.2.6-dev 2023-03-28 17:27:17 -04:00
Ilija Tovilo
5eb6905405
Disable --with-valgrind by default (#10934)
Same reasoning as GH-10876
2023-03-25 18:10:14 +01:00
Arnaud Le Blanc
0c7fc351ea Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:56:34 +01:00
Arnaud Le Blanc
37030257b8 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:45:50 +01:00
Kévin Dunglas
ad85e71421
fix: support for timeouts with ZTS on Linux (#10141) 2023-03-03 11:35:06 +01:00
Patrick Allaert
729f006de8
PHP-8.1 is now for PHP 8.1.18-dev 2023-02-28 21:37:52 +01:00
Sergey Panteleev
23ce3423c1
PHP-8.2 is now for PHP 8.2.5-dev 2023-02-28 18:15:20 +03:00
Max Kellermann
d6e95041e2 Zend/zend_types.h: move zend_rc_debug to zend_rc_debug.h
`zend_rc_debug` is not a type and does not really belong in
`zend_types.h`; this allows using `ZEND_RC_MOD_CHECK()` without
including the huge `zend_types.h` header and allows decoupling
circular header dependencies.
2023-02-26 14:16:53 +00:00
Ben Ramsey
586e81b259
Point to the issue tracker on GitHub 2023-02-14 13:49:02 -06:00
Pierrick Charron
dc054488da
PHP-8.2 is now for PHP 8.2.4-dev 2023-02-14 10:02:46 -05:00
Ben Ramsey
28d68f5013
PHP-8.1 is now for PHP 8.1.17-dev 2023-02-13 13:16:07 -06:00
Frank Du
a9437ceb6f
base64: add avx512 and vbmi version. (#6361)
1. Implementation based on https://github.com/WojciechMula/base64simd
2. Only runtime path is added to reduce the complexity of SIMD variants.
3. Expand test case to cover SIMD implementation.

Signed-off-by: Frank Du <frank.du@intel.com>
2023-02-13 03:30:47 +00:00
Derick Rethans
df853cb305 Bump minimum re2c version requirement to 1.0.3
The release VMs already enforced this, but PHP's configure script did
not.

re2c 0.13.5, which timelib's date/time parser requires is no longer
compatible with the current version of Zend/zend_language_scanner.l, as
it starts spinning in a loop.
2023-02-09 10:59:58 +00:00
Alex Dowad
c8ec2ed730 Add AVX2-accelerated UTF-16 decoding/encoding routines
As with other SIMD-accelerated functions in php-src, the new UTF-16
encoding and decoding routines can be compiled either with AVX2
acceleration "always on", "always off", or else with runtime detection
of AVX2 support.

With the new UTF-16 decoder/encoder, conversion of extremely short
strings (as in several bytes) has the same performance as before,
and conversion of medium-length (~100 character) strings is about 65%
faster, but conversion of long (~10,000 character) strings is around
6 times faster.

Many other mbstring functions will also be faster now when handling
UTF-16; for example, mb_strlen is almost 3 times faster on medium
strings, and almost 9 times faster on long strings. (Why does mb_strlen
benefit more from AVX2 acceleration than mb_convert_encoding? It's
because mb_strlen only needs to decode, but not re-encode, the input
string, and the UTF-16 decoder benefits much more from SIMD
acceleration than the UTF-16 encoder.)
2023-02-05 20:06:42 +02:00
Peter Kokot
bf5fdbd3a8
AC_PROG_CC_C99 is obsolete with autoconf >= 2.70 (#10383)
To make sure that compiler supports C99 before Autoconf 2.69, this was
needed. But with Autoconf 2.70 and later the macro is obsolete because
the checks are done in AC_PROG_CC and warnings are emitted when building
configure script.

Fixes part of GH-9483
2023-01-23 13:39:41 +00:00
Sergey Panteleev
eee988e86d
PHP-8.2 is now for PHP 8.2.3-dev 2023-01-17 20:55:22 +03:00
Patrick Allaert
c47a1a260d
PHP-8.1 is now for PHP 8.1.16-dev 2023-01-17 17:24:25 +01:00
Arnaud Le Blanc
a11c8a3039
Limit stack size (#9104) 2022-12-16 17:44:26 +01:00
Pierrick Charron
002d54db9f
PHP-8.2 is now for PHP 8.2.2-dev 2022-12-13 19:29:29 -05:00
Ben Ramsey
696bb385df
PHP-8.1 is now for PHP 8.1.15-dev 2022-12-07 11:29:37 -06:00
David CARLIER
3660bc31de opcache fixing w/x pages creation on freebsd 13.1 and above.
By default, the system allows these but admin can disable them system wide.
However the procctl api permits to control it per process.

Closes GH-9896.
2022-11-18 19:22:00 +00:00