| 1 | #ifndef __wasi_libc_nocwd_h |
| 2 | #define __wasi_libc_nocwd_h |
| 3 | |
| 4 | /* |
| 5 | * In order to support AT_FDCWD, we need to wrap the *at functions to handle |
| 6 | * it by calling back into the non-at versions which perform libpreopen |
| 7 | * queries. These __wasilibc_nocwd_* forms are the underlying calls which |
| 8 | * assume AT_FDCWD has already been resolved. |
| 9 | */ |
| 10 | |
| 11 | #define __need_size_t |
| 12 | #include <stddef.h> |
| 13 | #include <__typedef_ssize_t.h> |
| 14 | #include <__typedef_mode_t.h> |
| 15 | #include <__typedef_DIR.h> |
| 16 | |
| 17 | #ifdef __cplusplus |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
| 21 | struct timespec; |
| 22 | struct stat; |
| 23 | struct dirent; |
| 24 | |
| 25 | int __wasilibc_nocwd___wasilibc_unlinkat(int, const char *) |
| 26 | __attribute__((__warn_unused_result__)); |
| 27 | int __wasilibc_nocwd___wasilibc_rmdirat(int, const char *) |
| 28 | __attribute__((__warn_unused_result__)); |
| 29 | int __wasilibc_nocwd_linkat(int, const char *, int, const char *, int) |
| 30 | __attribute__((__warn_unused_result__)); |
| 31 | int __wasilibc_nocwd_symlinkat(const char *, int, const char *) |
| 32 | __attribute__((__warn_unused_result__)); |
| 33 | ssize_t __wasilibc_nocwd_readlinkat(int, const char *__restrict, char *__restrict, size_t) |
| 34 | __attribute__((__warn_unused_result__)); |
| 35 | int __wasilibc_nocwd_faccessat(int, const char *, int, int) |
| 36 | __attribute__((__warn_unused_result__)); |
| 37 | int __wasilibc_nocwd_renameat(int, const char *, int, const char *) |
| 38 | __attribute__((__warn_unused_result__)); |
| 39 | int __wasilibc_nocwd_openat_nomode(int, const char *, int) |
| 40 | __attribute__((__warn_unused_result__)); |
| 41 | int __wasilibc_nocwd_fstatat(int, const char *__restrict, struct stat *__restrict, int) |
| 42 | __attribute__((__warn_unused_result__)); |
| 43 | int __wasilibc_nocwd_mkdirat_nomode(int, const char *) |
| 44 | __attribute__((__warn_unused_result__)); |
| 45 | int __wasilibc_nocwd_utimensat(int, const char *, const struct timespec [2], int) |
| 46 | __attribute__((__warn_unused_result__)); |
| 47 | DIR *__wasilibc_nocwd_opendirat(int, const char *) |
| 48 | __attribute__((__warn_unused_result__)); |
| 49 | int __wasilibc_nocwd_scandirat(int, const char *, struct dirent ***, |
| 50 | int (*)(const struct dirent *), |
| 51 | int (*)(const struct dirent **, const struct dirent **)) |
| 52 | __attribute__((__warn_unused_result__)); |
| 53 | |
| 54 | #ifdef __cplusplus |
| 55 | } |
| 56 | #endif |
| 57 | |
| 58 | #endif |