mirror of
git://git.musl-libc.org/musl
synced 2024-12-17 12:14:42 +00:00
2dd8d5e1b8
musl does not support legacy 32-bit-off_t whatsoever. off_t is always 64 bit, and correct programs that use off_t and the standard functions will just work out of the box. (on glibc, they would require -D_FILE_OFFSET_BITS=64 to work.) however, some programs instead define _LARGEFILE64_SOURCE and use alternate versions of all the standard types and functions with "64" appended to their names. we do not want code to actually get linked against these functions (it's ugly and inconsistent), so macros are used instead of prototypes with weak aliases in the library itself. eventually the weak aliases may be added at the library level for the sake of using code that was originally built against glibc, but the macros will still be the desired solution in the headers.
47 lines
763 B
C
47 lines
763 B
C
#ifndef _GLOB_H
|
|
#define _GLOB_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#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 *, int, int (*)(const char *, int), glob_t *);
|
|
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_NOSPACE 1
|
|
#define GLOB_ABORTED 2
|
|
#define GLOB_NOMATCH 3
|
|
#define GLOB_NOSYS 4
|
|
|
|
#ifdef _LARGEFILE64_SOURCE
|
|
#define glob64 glob
|
|
#define globfree64 globfree
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|