blob: 9fbbaa65ea2042447992ac1e1c567e2ba479e147 [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#ifndef _GLOB_H
2#define _GLOB_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
Rich Felkerc1a96582012-09-07 23:13:55 -04008#include <features.h>
Rich Felker400c5e52012-09-06 22:44:55 -04009
Rich Felker0b44a032011-02-12 00:22:29 -050010#define __NEED_size_t
11
12#include <bits/alltypes.h>
13
14typedef struct {
15 size_t gl_pathc;
16 char **gl_pathv;
17 size_t gl_offs;
18 int __dummy1;
19 void *__dummy2[5];
20} glob_t;
21
Rich Felker400c5e52012-09-06 22:44:55 -040022int glob(const char *__restrict, int, int (*)(const char *, int), glob_t *__restrict);
Rich Felker0b44a032011-02-12 00:22:29 -050023void globfree(glob_t *);
24
25#define GLOB_ERR 0x01
26#define GLOB_MARK 0x02
27#define GLOB_NOSORT 0x04
28#define GLOB_DOOFFS 0x08
29#define GLOB_NOCHECK 0x10
30#define GLOB_APPEND 0x20
31#define GLOB_NOESCAPE 0x40
32#define GLOB_PERIOD 0x80
33
34#define GLOB_NOSPACE 1
35#define GLOB_ABORTED 2
36#define GLOB_NOMATCH 3
37#define GLOB_NOSYS 4
38
Rich Felker3b94dab2012-06-04 08:03:56 -040039#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
Rich Felker2dd8d5e2012-05-04 00:13:23 -040040#define glob64 glob
41#define globfree64 globfree
42#endif
43
Rich Felker0b44a032011-02-12 00:22:29 -050044#ifdef __cplusplus
45}
46#endif
47
48#endif