Commit Graph

532 Commits

Author SHA1 Message Date
Peter Kokot
154517eba9
Simplify openpty Autoconf check (#13494)
This removes redundant symbols HAVE_LIBUTIL and HAVE_LIBBSD.
2024-02-28 20:14:24 +01:00
Peter Kokot
acb677cbcf
Simplify Pgrab and proc library Autoconf check (#13488)
For Solaris/illumos systems, in this case, the check can be done using
AC_SEARCH_LIBS, which avoids defining redundant symbols like HAVE_PGRAB
and HAVE_LIBPROC.
2024-02-28 18:41:51 +01:00
Peter Kokot
d024dd3abd
Simplify nanosleep Autoconf check (#13490)
The nanosleep() is mostly found in libc, except on systems, such as
Solaris <= 10 or the discontinued OpenSolaris, it is in the rt library.

This checks if nanosleep() exists in the libc, then it checks if rt
library has nanosleep, prepends it to LIBS and defines the
HAVE_NANOSLEEP symbol with the template from the AC_CHECK_FUNCS.
2024-02-25 18:28:33 +01:00
Jorg Sowa
9c4beac8d3 Remove inet_aton
This removes the deprecated inet_aton and its Windows implementation.
The inet_aton can be replaced with platform agnostic inet_pton.

Closes GH-13479
2024-02-23 23:16:43 +01:00
Peter Kokot
bd365149f2
Find and link math library as needed with AC_SEARCH_LIBS (#13481)
On some systems (Haiku) the math library is part of the C library and it
doesn't need to be explicitly prepended to LIBS. The redundant HAVE_LIBM
symbol defined by the AC_CHECK_LIB has been removed.
2024-02-23 20:48:10 +01:00
Peter Kokot
e9f8defd34
Find and link dl library as needed with AC_SEARCH_LIBS (#13482)
AC_SEARCH_LIBS can be used to check for dlopen and if dl library needs
to be prepended to LIBS. The dlsym is available with the same scope as
dlopen (if dlopen is present, also dlsym is). The redundant HAVE_DLOPEN
and HAVE_DLSYM symbols have been removed.
2024-02-23 20:44:06 +01:00
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
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