aboutsummaryrefslogtreecommitdiff
path: root/zenserver/compute/apply.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-11-03 09:25:54 +0100
committerMartin Ridgers <[email protected]>2021-11-03 09:25:54 +0100
commit30d1beba4d8ab3db48fd7bf8d6cc63d565c20e9c (patch)
treeea480c8fe49dfffba3e4a4b3883a3b10ede5d99f /zenserver/compute/apply.cpp
parentWrapped /apply/ and /exec/ services in a ZEN_WITH_COMPUTE_SERVICES define (diff)
downloadzen-30d1beba4d8ab3db48fd7bf8d6cc63d565c20e9c.tar.xz
zen-30d1beba4d8ab3db48fd7bf8d6cc63d565c20e9c.zip
Removed if-def ZEN_PLATFORM_WINDOWS as its covered by WITH_COMPUTE now
Diffstat (limited to 'zenserver/compute/apply.cpp')
-rw-r--r--zenserver/compute/apply.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp
index e1ab7c984..4a92b9968 100644
--- a/zenserver/compute/apply.cpp
+++ b/zenserver/compute/apply.cpp
@@ -17,17 +17,15 @@
#include <zenstore/cas.h>
#include <zenstore/cidstore.h>
-#if ZEN_PLATFORM_WINDOWS
-# include <zencore/windows.h>
+#include <zencore/windows.h>
ZEN_THIRD_PARTY_INCLUDES_START
-# include <AccCtrl.h>
-# include <AclAPI.h>
-# include <sddl.h>
-# include <UserEnv.h>
-# pragma comment(lib, "UserEnv.lib")
-# include <atlbase.h>
+#include <AccCtrl.h>
+#include <AclAPI.h>
+#include <sddl.h>
+#include <UserEnv.h>
+#pragma comment(lib, "UserEnv.lib")
+#include <atlbase.h>
ZEN_THIRD_PARTY_INCLUDES_END
-#endif
#include <filesystem>
#include <span>
@@ -36,7 +34,6 @@ using namespace std::literals;
namespace zen {
-#if ZEN_PLATFORM_WINDOWS
struct BasicFunctionJob
{
public:
@@ -136,11 +133,9 @@ BasicFunctionJob::ExitCode()
return gsl::narrow_cast<int>(Ec);
}
-#endif
////////////////////////////////////////////////////////////////////////////////
-#if ZEN_PLATFORM_WINDOWS
struct SandboxedFunctionJob
{
SandboxedFunctionJob() = default;
@@ -330,7 +325,6 @@ SandboxedFunctionJob::SpawnJob(std::filesystem::path ExePath)
return true;
}
-#endif
////////////////////////////////////////////////////////////////////////////////
@@ -772,7 +766,6 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action)
std::string_view ExecPath = Desc["path"].AsString();
std::filesystem::path ExePath = SandboxPath / ExecPath;
-#if ZEN_PLATFORM_WINDOWS
WideStringBuilder<512> CommandLine;
CommandLine.Append(L'"');
CommandLine.Append(ExePath.c_str());
@@ -819,7 +812,6 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action)
GetExitCodeProcess(ProcessInformation.hProcess, &ExitCode);
// Gather outputs
-#endif // ZEN_PLATFORM_WINDOWS
FileContents OutputData = zen::ReadFile(SandboxPath / "build.output");