From a8b0ea58e60bb0326b7f7c8f3c736d89ce9ef1df Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Sun, 29 Jun 2025 19:19:23 +0100 Subject: wip macOS port --- nihil.posix/posix.ccm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'nihil.posix/posix.ccm') diff --git a/nihil.posix/posix.ccm b/nihil.posix/posix.ccm index e63ad6b..ea13f81 100644 --- a/nihil.posix/posix.ccm +++ b/nihil.posix/posix.ccm @@ -9,6 +9,8 @@ module; #include #include +#include "nihil.hh" + export module nihil.posix; import nihil.error; @@ -16,7 +18,9 @@ import nihil.error; export import :argv; export import :ensure_dir; export import :exec; +export import :execv; export import :fd; +export import :find_in_path; export import :getenv; export import :open; export import :process; @@ -26,14 +30,6 @@ export import :spawn; export import :tempfile; export import :write_file; -export namespace nihil { - -/* - * Find an executable in $PATH, open it with O_EXEC and return the fd. - * If $PATH is not set, uses _PATH_DEFPATH. If the file can't be found - * or opened, returns std::nullopt. - */ -[[nodiscard]] auto find_in_path(std::filesystem::path const &file) - -> std::optional; - -} // namespace nihil +#ifdef NIHIL_HAVE_FEXECVE +export import :fexecv; +#endif -- cgit v1.2.3