diff options
Diffstat (limited to 'posix/glob.h')
-rw-r--r-- | posix/glob.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/posix/glob.h b/posix/glob.h index 609f217..f4c0974 100644 --- a/posix/glob.h +++ b/posix/glob.h @@ -43,6 +43,21 @@ extern "C" { # define __ptr_t char * #endif /* C++ or ANSI C. */ +/* We need `size_t' for the following definitions. */ +#ifndef __size_t +# if defined __GNUC__ && __GNUC__ >= 2 +typedef __SIZE_TYPE__ __size_t; +# else +/* This is a guess. */ +typedef unsigned long int __size_t; +# endif +#else +/* The GNU CC stddef.h version defines __size_t as empty. We need a real + definition. */ +# undef __size_t +# define __size_t size_t +#endif + /* Bits set in the FLAGS argument to `glob'. */ #define GLOB_ERR (1 << 0)/* Return on read errors. */ #define GLOB_MARK (1 << 1)/* Append a slash to each name. */ @@ -90,9 +105,9 @@ struct stat; #endif typedef struct { - size_t gl_pathc; /* Count of paths matched by the pattern. */ + __size_t gl_pathc; /* Count of paths matched by the pattern. */ char **gl_pathv; /* List of matched pathnames. */ - size_t gl_offs; /* Slots to reserve in `gl_pathv'. */ + __size_t gl_offs; /* Slots to reserve in `gl_pathv'. */ int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */ /* If the GLOB_ALTDIRFUNC flag is set, the following functions @@ -108,9 +123,9 @@ typedef struct struct stat64; typedef struct { - size_t gl_pathc; + __size_t gl_pathc; char **gl_pathv; - size_t gl_offs; + __size_t gl_offs; int gl_flags; /* If the GLOB_ALTDIRFUNC flag is set, the following functions |