changeset 2065:272094362301

nacl
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 Jul 2016 17:50:18 +0200
parents e92280e63d8d
children 79fa4262e8d4
files Core/Toolbox.cpp Core/Toolbox.h Resources/CMake/BoostConfiguration.cmake
diffstat 3 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Toolbox.cpp	Mon Jul 04 19:07:47 2016 +0200
+++ b/Core/Toolbox.cpp	Tue Jul 05 17:50:18 2016 +0200
@@ -1306,6 +1306,7 @@
 #endif
 
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
   void Toolbox::ExecuteSystemCommand(const std::string& command,
                                      const std::vector<std::string>& arguments)
   {
@@ -1363,6 +1364,7 @@
       throw OrthancException(ErrorCode_SystemCommand);
     }
   }
+#endif
 
   
   bool Toolbox::IsInteger(const std::string& str)
--- a/Core/Toolbox.h	Mon Jul 04 19:07:47 2016 +0200
+++ b/Core/Toolbox.h	Tue Jul 05 17:50:18 2016 +0200
@@ -204,8 +204,10 @@
                    const std::string& arrayElement = "item");
 #endif
 
+#if !defined(ORTHANC_SANDBOXED) || ORTHANC_SANDBOXED != 1
     void ExecuteSystemCommand(const std::string& command,
                               const std::vector<std::string>& arguments);
+#endif
 
     bool IsInteger(const std::string& str);
 
--- a/Resources/CMake/BoostConfiguration.cmake	Mon Jul 04 19:07:47 2016 +0200
+++ b/Resources/CMake/BoostConfiguration.cmake	Tue Jul 05 17:50:18 2016 +0200
@@ -55,7 +55,9 @@
       ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
       ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
       ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
-      ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl")
+      ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
+      ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
+      ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
     list(APPEND BOOST_SOURCES
       ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp
       ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp
@@ -68,7 +70,9 @@
       )
 
     if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR
-        ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl")
+        ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
+        ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
+        ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
       add_definitions(-DBOOST_HAS_SCHED_YIELD=1)
     endif()
 
@@ -114,7 +118,9 @@
     ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
     )
 
-  if (${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl")
+  if (${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
+      ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
+      ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
     # boost::filesystem is not available on PNaCl
     add_definitions(
       -DBOOST_HAS_FILESYSTEM_V3=0
@@ -136,7 +142,9 @@
         ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
         ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
         ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
-        ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl")
+        ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
+        ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
+        ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
       list(APPEND BOOST_SOURCES
         ${BOOST_SOURCES_DIR}/libs/locale/src/posix/codecvt.cpp
         ${BOOST_SOURCES_DIR}/libs/locale/src/posix/collate.cpp