diff options
author | David Robillard <d@drobilla.net> | 2022-10-23 13:41:27 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-10-23 14:57:45 -0400 |
commit | d8b960be46007f9c09356e526d3c2dcff4b186a5 (patch) | |
tree | cd40db8d5634e74f8795922b7ab19fc8c6507648 /src/system.h | |
parent | c886d489576cd0bc33d7d22d81981c794067946f (diff) | |
download | zix-d8b960be46007f9c09356e526d3c2dcff4b186a5.tar.gz zix-d8b960be46007f9c09356e526d3c2dcff4b186a5.tar.bz2 zix-d8b960be46007f9c09356e526d3c2dcff4b186a5.zip |
Add filesystem API
Diffstat (limited to 'src/system.h')
-rw-r--r-- | src/system.h | 30 |
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 |