zig/lib/libc/include/wasm-wasi-musl/__header_dirent.h
Frank Denis da9c530d99
Update wasi-libc to a00bf321eeeca836ee2a0d2d25aeb8524107b8cc (#13626)
* Update wasi-libc to a00bf321eeeca836ee2a0d2d25aeb8524107b8cc

It includes a port of emscripten's allocator that performs
performs much better than the old one.

Most importantly, it includes the prerequisites to later add
support for POSIX threads.
2022-11-28 19:58:03 +01:00

45 lines
1.1 KiB
C
Vendored

#ifndef __wasilibc___header_dirent_h
#define __wasilibc___header_dirent_h
#include <wasi/api.h>
#define DT_BLK __WASI_FILETYPE_BLOCK_DEVICE
#define DT_CHR __WASI_FILETYPE_CHARACTER_DEVICE
#define DT_DIR __WASI_FILETYPE_DIRECTORY
#define DT_FIFO __WASI_FILETYPE_SOCKET_STREAM
#define DT_LNK __WASI_FILETYPE_SYMBOLIC_LINK
#define DT_REG __WASI_FILETYPE_REGULAR_FILE
#define DT_UNKNOWN __WASI_FILETYPE_UNKNOWN
#define IFTODT(x) (__wasilibc_iftodt(x))
#define DTTOIF(x) (__wasilibc_dttoif(x))
int __wasilibc_iftodt(int x);
int __wasilibc_dttoif(int x);
#include <__struct_dirent.h>
#include <__typedef_DIR.h>
#ifdef __cplusplus
extern "C" {
#endif
int closedir(DIR *);
DIR *opendir(const char *);
DIR *fdopendir(int);
int fdclosedir(DIR *);
struct dirent *readdir(DIR *);
void rewinddir(DIR *);
void seekdir(DIR *, long);
long telldir(DIR *);
DIR *opendirat(int, const char *);
void rewinddir(DIR *);
int scandirat(int, const char *, struct dirent ***,
int (*)(const struct dirent *),
int (*)(const struct dirent **, const struct dirent **));
#ifdef __cplusplus
}
#endif
#endif