[php-src] PR #18164: Use win32 glob implementation on all platforms
| From: | NattyNarwhal | Date: | Thu, 27 Mar 2025 19:00:23 +0000 |
| Subject: | [php-src] PR #18164: Use win32 glob implementation on all platforms | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-31198@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/18164
Author: NattyNarwhal
Due to inconsistencies across platforms (see GH-15564), it's probably better to have a
consistent glob implementation everywhere. We already have to have one for Win32 (based on the
OpenBSD implementation), so we can also use it on Unix too.
Some concerns:
* Using the system glob implementation isn't wired up yet; just a matter if binding ifdefs and
gunk in the build system.
*
HAVE_GLOB is removed from code; should only be used for the previously mentioned
system glob implementation if we decide to use that.
* GLOB_ONLYDIR is a GNU extension, not implemented by the OpenBSD implementation (nor
is it by macOS, other BSDs, musl, etc.). However, it's handled by callers due to the fact the
GNU implementation is flawed, so we don't need to implement it in the glob implementation,
especially if we want to be compatible with non-GNU. We just need to define the flag. This also
removes an unused define as well.
This may need an RFC. It may also be prudent to merge GH-17433.