summaryrefslogtreecommitdiffstats
path: root/libc-bottom-half/headers/public/wasi/libc-nocwd.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 13:54:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 13:54:38 +0000
commit8c1ab65c0f548d20b7f177bdb736daaf603340e1 (patch)
treedf55b7e75bf43f2bf500845b105afe3ac3a5157e /libc-bottom-half/headers/public/wasi/libc-nocwd.h
parentInitial commit. (diff)
downloadwasi-libc-8c1ab65c0f548d20b7f177bdb736daaf603340e1.tar.xz
wasi-libc-8c1ab65c0f548d20b7f177bdb736daaf603340e1.zip
Adding upstream version 0.0~git20221206.8b7148f.upstream/0.0_git20221206.8b7148f
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libc-bottom-half/headers/public/wasi/libc-nocwd.h')
-rw-r--r--libc-bottom-half/headers/public/wasi/libc-nocwd.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/libc-bottom-half/headers/public/wasi/libc-nocwd.h b/libc-bottom-half/headers/public/wasi/libc-nocwd.h
new file mode 100644
index 0000000..a988503
--- /dev/null
+++ b/libc-bottom-half/headers/public/wasi/libc-nocwd.h
@@ -0,0 +1,58 @@
+#ifndef __wasi_libc_nocwd_h
+#define __wasi_libc_nocwd_h
+
+/*
+ * In order to support AT_FDCWD, we need to wrap the *at functions to handle
+ * it by calling back into the non-at versions which perform libpreopen
+ * queries. These __wasilibc_nocwd_* forms are the underlying calls which
+ * assume AT_FDCWD has already been resolved.
+ */
+
+#define __need_size_t
+#include <stddef.h>
+#include <__typedef_ssize_t.h>
+#include <__typedef_mode_t.h>
+#include <__typedef_DIR.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct timespec;
+struct stat;
+struct dirent;
+
+int __wasilibc_nocwd___wasilibc_unlinkat(int, const char *)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd___wasilibc_rmdirat(int, const char *)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_linkat(int, const char *, int, const char *, int)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_symlinkat(const char *, int, const char *)
+ __attribute__((__warn_unused_result__));
+ssize_t __wasilibc_nocwd_readlinkat(int, const char *__restrict, char *__restrict, size_t)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_faccessat(int, const char *, int, int)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_renameat(int, const char *, int, const char *)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_openat_nomode(int, const char *, int)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_fstatat(int, const char *__restrict, struct stat *__restrict, int)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_mkdirat_nomode(int, const char *)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_utimensat(int, const char *, const struct timespec [2], int)
+ __attribute__((__warn_unused_result__));
+DIR *__wasilibc_nocwd_opendirat(int, const char *)
+ __attribute__((__warn_unused_result__));
+int __wasilibc_nocwd_scandirat(int, const char *, struct dirent ***,
+ int (*)(const struct dirent *),
+ int (*)(const struct dirent **, const struct dirent **))
+ __attribute__((__warn_unused_result__));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif