summaryrefslogtreecommitdiffstats
path: root/src/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
new file mode 100644
index 0000000..ca55161
--- /dev/null
+++ b/src/system.h
@@ -0,0 +1,30 @@
+// Copyright 2022 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
+
+#ifndef ZIX_SYSTEM_H
+#define ZIX_SYSTEM_H
+
+#include "zix/status.h"
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#ifdef _WIN32
+typedef int ZixSystemCountReturn;
+# ifndef __GNUC__
+typedef int mode_t;
+# endif
+#else
+typedef ssize_t ZixSystemCountReturn;
+#endif
+
+uint32_t
+zix_system_page_size(void);
+
+int
+zix_system_open_fd(const char* path, int flags, mode_t mode);
+
+ZixStatus
+zix_system_close_fds(int fd1, int fd2);
+
+#endif // ZIX_SYSTEM_H