Skip to content

Commit 8264628

Browse files
committed
Fix inclusion of GLOB_ONLYDIR
This is a GNU extension, but we don't need to implement it, as the GNU implementation is flawed enough that callers have to manually filter it anyways; just provide a stub definition for the constant. We could consideer implementing this properly later. For now, fixes the basic glob constant tests.
1 parent 4ab5272 commit 8264628

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

ext/standard/dir.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
*/
5656
const GLOB_NOSORT = UNKNOWN;
5757
#endif
58-
#ifdef PHP_GLOB_ONLYDIR
58+
#if (defined(PHP_GLOB_ONLYDIR) && PHP_GLOB_ONLYDIR != 0)
5959
/**
6060
* @var int
6161
* @cvalue PHP_GLOB_ONLYDIR

ext/standard/dir_arginfo.h

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main/php_glob.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ END_EXTERN_C()
110110

111111
#ifndef PHP_GLOB_ONLYDIR
112112
#define PHP_GLOB_ONLYDIR (1<<30)
113-
#define PHP_GLOB_EMULATE_ONLYDIR
114113
#define PHP_GLOB_FLAGMASK (~PHP_GLOB_ONLYDIR)
115114
#else
116115
#define PHP_GLOB_FLAGMASK (~0)

0 commit comments

Comments
 (0)