aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/posix.ccm
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-06-29 19:19:23 +0100
committerLexi Winter <lexi@le-fay.org>2025-06-29 19:19:23 +0100
commita8b0ea58e60bb0326b7f7c8f3c736d89ce9ef1df (patch)
tree6dafcf2674780649dcdc2649855722357837a68e /nihil.posix/posix.ccm
parent4fa6821e0645ff61a9380cd090abff472205c630 (diff)
downloadnihil-a8b0ea58e60bb0326b7f7c8f3c736d89ce9ef1df.tar.gz
nihil-a8b0ea58e60bb0326b7f7c8f3c736d89ce9ef1df.tar.bz2
wip macOS port
Diffstat (limited to 'nihil.posix/posix.ccm')
-rw-r--r--nihil.posix/posix.ccm18
1 files changed, 7 insertions, 11 deletions
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 <optional>
#include <string>
+#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<fd>;
-
-} // namespace nihil
+#ifdef NIHIL_HAVE_FEXECVE
+export import :fexecv;
+#endif