refactor(platform): make remaining POSIX assumptions explicit
This commit is contained in:
1 parent
1a4c062021
commit
b8c362917f
6 files changed
+26
-1
No files matched your search
@@ -50,6 +50,12 @@
|
||||
#include <unistd.h>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
|
||||
// The daemon control socket is a POSIX Unix-domain socket (Linux/macOS). Windows support is
|
||||
// planned (Track C3) and would need a named-pipe transport instead.
|
||||
#if defined(_WIN32)
|
||||
#error "The vbs daemon Unix-socket transport requires a POSIX host (Track C3 Windows port is planned)."
|
||||
#endif
|
||||
#include <vector>
|
||||
|
||||
namespace Void::Build::Daemon {
|
||||
@@ -446,7 +452,11 @@ evaluate_workspace_members(const DaemonOptions &options) {
|
||||
member.name, dir.string())};
|
||||
}
|
||||
const std::string env_name = "VBS_WORKSPACE_MEMBER_" + member.name;
|
||||
#if defined(_WIN32)
|
||||
(void)_putenv_s(env_name.c_str(), canonical.c_str());
|
||||
#else
|
||||
(void)::setenv(env_name.c_str(), canonical.c_str(), 1);
|
||||
#endif
|
||||
members.push_back(WorkspaceMemberDir{member.name, canonical});
|
||||
}
|
||||
return members;
|
||||
|
||||
Reference in new issue
Block a user