[php-src] PR #14116: Use AC_SEARCH_LIBS for socketpair, gethostname and gethostbyaddr
| From: | petk | Date: | Thu, 02 May 2024 22:39:20 +0000 |
| Subject: | [php-src] PR #14116: Use AC_SEARCH_LIBS for socketpair, gethostname and gethostbyaddr | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25993@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14116
Author: petk
The socketpair():
* C library: Solaris 11.4 and most other systems
* libsocket: Solaris <= 11.3 and illumos
* libnetwork: Haiku
The gethostname() check is moved to AC_CHECK_FUNCS:
* C library: most systems
* libnsl: none
* libnetwork: Haiku (which is already checked in the libraries section)
The gethostbyaddr():
* C library: most systems, Solaris 11.4
* libnsl: Solaris 11.3, illumos
* libnetwork: Haiku
This also removes redundant unused symbols:
- HAVE_GETHOSTBYADDR
- HAVE_LIBNETWORK
- HAVE_LIBNSL
The outdated comment about -lnsl and -lsocket linking has been removed because these systems are
long not supported anymore and this issue is not relevant anymore like mentioned. The initial
solution was different than the one with the PHP_CHECK_FUNC macros at the current versions. See
commit a188fac946a65f4dcc2c6a0f37b0799d74500741 where the gethostbyaddr() was checked conditionally
based on the gethostname() availability in libc. Main issue was mostly related to the redundant nsl
library being always linked because of the AC_CHECK_LIB.