wasi-libc/libc-bottom-half/headers/public/__header_unistd.h
Dan Gohman 215adc8ac9
Redefine the access bits to be compatible with other systems (#210)
Normally bits like this would be considered implementation details, but
in this case, `X_OK`, `W_OK`, and `R_OK` line up with `S_IXOTH`,
`S_IWOTH`, and `S_IROTH` on other systems, and those bits do have
well-known values.
2020-07-31 13:44:58 -07:00

29 lines
516 B
C

#ifndef __wasilibc___header_unistd_h
#define __wasilibc___header_unistd_h
struct stat;
#include <__seek.h>
#define F_OK (0)
#define X_OK (1)
#define W_OK (2)
#define R_OK (4)
#ifdef __cplusplus
extern "C" {
#endif
int close(int fd);
int faccessat(int, const char *, int, int);
int fstatat(int, const char *__restrict, struct stat *__restrict, int);
int renameat(int, const char *, int, const char *);
int openat(int, const char *, int, ...);
void *sbrk(intptr_t increment);
#ifdef __cplusplus
}
#endif
#endif