Skip to content

Commit 5fd5e54

Browse files
committed
Remove unsupported non standard flags
1 parent 095aa27 commit 5fd5e54

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

win32/glob.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
*
4242
* Optional extra services, controlled by flags not defined by POSIX:
4343
*
44-
* GLOB_QUOTE:
45-
* Escaping convention: \ inhibits any special meaning the following
46-
* character might have (except \ at end of string is retained).
4744
* GLOB_MAGCHAR:
4845
* Set in gl_flags if pattern contained a globbing character.
4946
* GLOB_NOMAGIC:
@@ -151,12 +148,10 @@ PHPAPI int glob(const char *pattern, int flags, int (*errfunc)(const char *, int
151148
int c;
152149
Char *bufnext, *bufend, patbuf[MAXPATHLEN];
153150

154-
#ifdef PHP_WIN32
155151
/* Force skipping escape sequences on windows
156152
* due to the ambiguity with path backslashes
157153
*/
158154
flags |= GLOB_NOESCAPE;
159-
#endif
160155

161156
patnext = (uint8_t *) pattern;
162157
if (!(flags & GLOB_APPEND)) {

win32/glob.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,26 @@ typedef struct {
5555
int (*gl_errfunc)(const char *, int);
5656
} glob_t;
5757

58-
/* Flags */
58+
/* Standard POSIX Flags */
5959
#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
6060
#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
6161
#define GLOB_ERR 0x0004 /* Return on error. */
6262
#define GLOB_MARK 0x0008 /* Append / to matching directories. */
6363
#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
64+
#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */
6465
#define GLOB_NOSORT 0x0020 /* Don't sort. */
6566
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
67+
68+
/* Implementation defined flags */
6669
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
6770
#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
68-
#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
6971
#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
70-
#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */
7172
#define GLOB_LIMIT 0x2000 /* Limit pattern match output to ARG_MAX */
7273

7374
/* Error values returned by glob(3) */
7475
#define GLOB_NOSPACE (-1) /* Malloc call failed. */
7576
#define GLOB_ABORTED (-2) /* Unignored error. */
7677
#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK not set. */
77-
#define GLOB_ABEND GLOB_ABORTED
7878

7979
BEGIN_EXTERN_C()
8080
PHPAPI int glob(const char *, int, int (*)(const char *, int), glob_t *);

0 commit comments

Comments
 (0)