[php-src] PR #15555: getaddrinfo conversion

From: Date: Fri, 23 Aug 2024 16:13:34 +0000
Subject: [php-src] PR #15555: getaddrinfo conversion
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-28145@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/15555 Author: NattyNarwhal Probably perilous. Tested only on my Mac so far. Concerns: - This adds some new functions out of convenience (php_network_getaddress, for common situations like resolving localhost - we only want just the one) and necessity (php_network_getaddresses_ex - exposes more of getaddrinfo like address family). - There are quite a few spots that are IPv4 only. Some of them are because the function is documented as returning IPv4 addresses (this sucks, but too late in cycle to fix?), some are because it's just kinda assumed (i.e. FastCGI)? - sockaddr_conv.c should probably be converted to bool returns, though I'm not sure if it's an ABI break (since it can be represented differently). It's a little ugly anyways... - socket_addrinfo_lookup calls getaddrinfo directly. It could call php_network_getaddresses_ex, though we'd need to expose service there too. - This doesn't drop php_network_gethostbyname and the associated detritus just yet, since it's an ABI break. We could do it before RC1... - As previously mentioned, big build system simplification. - Does HAVE_IPV6 or building without it even make sense anymore? We kinda assume inet_ntop for example, so assuming getaddrinfo also makes sense. - Userland function gethostbyaddr actually calls the modern gethostbyname equivalent already when possible. The fallback path to the legacy function can be removed with gethostbyname. Fixes GH-15531

« previous php.git-pulls (#28145) next »