Mercurial > hg > orthanc
diff Core/Toolbox.cpp @ 2057:54417b0831c4
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 29 Jun 2016 13:40:24 +0200 |
parents | 35ccba7adae9 |
children | ed383e7a6753 |
line wrap: on
line diff
--- a/Core/Toolbox.cpp Mon Jun 27 17:35:58 2016 +0200 +++ b/Core/Toolbox.cpp Wed Jun 29 13:40:24 2016 +0200 @@ -111,6 +111,7 @@ namespace Orthanc { +#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1 static bool finish_; static ServerBarrierEvent barrierEvent_; @@ -188,6 +189,7 @@ const bool stopFlag = false; return ServerBarrierInternal(&stopFlag); } +#endif /* ORTHANC_SANDBOXED */ void Toolbox::ToUpperCase(std::string& s) @@ -677,11 +679,15 @@ return std::string(pathbuf); } +#elif defined(ORTHANC_SANDBOXED) && ORTHANC_SANDBOXED == 1 + // Sandboxed Orthanc, no access to the executable + #else #error Support your platform here #endif +#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1 std::string Toolbox::GetPathToExecutable() { boost::filesystem::path p(GetPathToExecutableInternal()); @@ -694,6 +700,7 @@ boost::filesystem::path p(GetPathToExecutableInternal()); return boost::filesystem::absolute(p.parent_path()).string(); } +#endif static const char* GetBoostLocaleEncoding(const Encoding sourceEncoding)