diff options
author | pk33 <pk33@pk33.space> | 2024-11-01 23:51:15 +0100 |
---|---|---|
committer | pk33 <pk33@pk33.space> | 2024-11-01 23:51:15 +0100 |
commit | 294b585994da4427ac98a8353ff41aed5f301d54 (patch) | |
tree | aafcd885c1fe28819ef1a511da5e6344411b5597 /include/musl/glob.h | |
parent | f0958551b43959174d28b2056f584d2081494e6c (diff) | |
download | engine33-294b585994da4427ac98a8353ff41aed5f301d54.tar.gz |
Import and fix old code
Diffstat (limited to 'include/musl/glob.h')
-rw-r--r-- | include/musl/glob.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/musl/glob.h b/include/musl/glob.h new file mode 100644 index 0000000..fed0674 --- /dev/null +++ b/include/musl/glob.h @@ -0,0 +1,52 @@ +#ifndef _GLOB_H +#define _GLOB_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <features.h> + +#define __NEED_size_t + +#include <bits/alltypes.h> + +typedef struct { + size_t gl_pathc; + char **gl_pathv; + size_t gl_offs; + int __dummy1; + void *__dummy2[5]; +} glob_t; + +int glob(const char *__restrict, int, int (*)(const char *, int), glob_t *__restrict); +void globfree(glob_t *); + +#define GLOB_ERR 0x01 +#define GLOB_MARK 0x02 +#define GLOB_NOSORT 0x04 +#define GLOB_DOOFFS 0x08 +#define GLOB_NOCHECK 0x10 +#define GLOB_APPEND 0x20 +#define GLOB_NOESCAPE 0x40 +#define GLOB_PERIOD 0x80 + +#define GLOB_TILDE 0x1000 +#define GLOB_TILDE_CHECK 0x4000 + +#define GLOB_NOSPACE 1 +#define GLOB_ABORTED 2 +#define GLOB_NOMATCH 3 +#define GLOB_NOSYS 4 + +#if defined(_LARGEFILE64_SOURCE) +#define glob64 glob +#define globfree64 globfree +#define glob64_t glob_t +#endif + +#ifdef __cplusplus +} +#endif + +#endif |