diff options
Diffstat (limited to 'glob/glob.h')
-rw-r--r-- | glob/glob.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/glob/glob.h b/glob/glob.h index 713117b..a546c86 100644 --- a/glob/glob.h +++ b/glob/glob.h @@ -19,13 +19,11 @@ #define _GLOB_H 1 #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif #undef __ptr_t -#if (defined __cplusplus || (defined __STDC__ && __STDC__) \ - || defined WINDOWS32) +#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32 # undef __P # define __P(protos) protos # define __ptr_t void * @@ -57,11 +55,12 @@ extern "C" # define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ # define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */ # define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */ -# define GLOB_TILDE (1 <<12)/* Expand ~user and ~ to home directories. */ +# define GLOB_TILDE (1 << 12)/* Expand ~user and ~ to home directories. */ +# define GLOB_ONLYDIR (1 << 13)/* Match only directories. */ # define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \ - GLOB_NOMAGIC|GLOB_TILDE) + GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR) #else # define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ @@ -79,6 +78,14 @@ extern "C" # define GLOB_ABEND GLOB_ABORTED #endif +/* This value is returned if the implementation does not support + `glob'. Since this is not the case here it will never be + returned but the conformance test suites still require the symbol + to be defined. */ +#if (_XOPEN_SOURCE - 0) == 500 +# define GLOB_NOSYS (-1) +#endif + /* Structure describing a globbing run. */ #if !defined _AMIGA && !defined VMS /* Buggy compiler. */ struct stat; |