diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-07-02 00:33:19 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-07-02 00:33:19 +0100 |
| commit | 8c9688fff4446a1b0f5fe9a9be0c50084726cc4d (patch) | |
| tree | ca9a10be5795d976c0cbc73ad1111517bb4e22bf /nihil.posix/open.ccm | |
| parent | 47999457e647352ae7e71d43c65e7b39ae5ca567 (diff) | |
| download | nihil-8c9688fff4446a1b0f5fe9a9be0c50084726cc4d.tar.gz nihil-8c9688fff4446a1b0f5fe9a9be0c50084726cc4d.tar.bz2 | |
CLI cleanups; fix the FreeBSD build
Diffstat (limited to 'nihil.posix/open.ccm')
| -rw-r--r-- | nihil.posix/open.ccm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/nihil.posix/open.ccm b/nihil.posix/open.ccm index f2f5ecd..a5a9e5d 100644 --- a/nihil.posix/open.ccm +++ b/nihil.posix/open.ccm @@ -39,9 +39,6 @@ export inline constexpr auto open_shared_lock = open_flags::mask<O_SHLOCK>(); export inline constexpr auto open_exclusive_lock = open_flags::mask<O_EXLOCK>(); export inline constexpr auto open_directory = open_flags::mask<O_DIRECTORY>(); export inline constexpr auto open_nofollow = open_flags::mask<O_NOFOLLOW>(); -export inline constexpr auto open_nofollow_any = open_flags::mask<O_NOFOLLOW_ANY>(); -export inline constexpr auto open_symlink = open_flags::mask<O_SYMLINK>(); -export inline constexpr auto open_eventonly = open_flags::mask<O_EVTONLY>(); export inline constexpr auto open_close_on_exec = open_flags::mask<O_CLOEXEC>(); export inline constexpr auto open_resolve_beneath = open_flags::mask<O_RESOLVE_BENEATH>(); @@ -62,6 +59,19 @@ export inline constexpr auto open_path = open_flags::mask<O_PATH>(); export inline constexpr auto open_empty_path = open_flags::mask<O_EMPTY_PATH>(); #endif +// macOS +#ifdef O_NOFOLLOW_ANY +export inline constexpr auto open_nofollow_any = open_flags::mask<O_NOFOLLOW_ANY>(); +#endif + +#ifdef O_SYMLINK +export inline constexpr auto open_symlink = open_flags::mask<O_SYMLINK>(); +#endif + +#ifdef O_EVTONLY +export inline constexpr auto open_eventonly = open_flags::mask<O_EVTONLY>(); +#endif + // Open the given file and return an fd for it. export [[nodiscard]] auto open(std::filesystem::path const &filename, open_flags flags, int mode = 0777) -> std::expected<fd, error> |
