changeset 2171:35febe19e874

improved support for sandboxed environments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Nov 2016 11:46:42 +0100
parents baf8dd89b4e0
children 84d1d392a9ab
files Core/Images/JpegReader.cpp Core/Images/JpegWriter.cpp Core/Images/PngReader.cpp Core/Images/PngWriter.cpp
diffstat 4 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Images/JpegReader.cpp	Wed Nov 23 11:45:02 2016 +0100
+++ b/Core/Images/JpegReader.cpp	Wed Nov 23 11:46:42 2016 +0100
@@ -36,7 +36,11 @@
 #include "JpegErrorManager.h"
 #include "../OrthancException.h"
 #include "../Logging.h"
-#include "../SystemToolbox.h"
+
+#if ORTHANC_SANDBOXED == 0
+#  include "../SystemToolbox.h"
+#endif
+
 
 namespace Orthanc
 {
--- a/Core/Images/JpegWriter.cpp	Wed Nov 23 11:45:02 2016 +0100
+++ b/Core/Images/JpegWriter.cpp	Wed Nov 23 11:46:42 2016 +0100
@@ -35,9 +35,11 @@
 
 #include "../OrthancException.h"
 #include "../Logging.h"
-#include "../SystemToolbox.h"
+#include "JpegErrorManager.h"
 
-#include "JpegErrorManager.h"
+#if ORTHANC_SANDBOXED == 0
+#  include "../SystemToolbox.h"
+#endif
 
 #include <stdlib.h>
 #include <vector>
--- a/Core/Images/PngReader.cpp	Wed Nov 23 11:45:02 2016 +0100
+++ b/Core/Images/PngReader.cpp	Wed Nov 23 11:46:42 2016 +0100
@@ -34,9 +34,12 @@
 #include "PngReader.h"
 
 #include "../OrthancException.h"
-#include "../SystemToolbox.h"
 #include "../Toolbox.h"
 
+#if ORTHANC_SANDBOXED == 0
+#  include "../SystemToolbox.h"
+#endif
+
 #include <png.h>
 #include <string.h>  // For memcpy()
 
--- a/Core/Images/PngWriter.cpp	Wed Nov 23 11:45:02 2016 +0100
+++ b/Core/Images/PngWriter.cpp	Wed Nov 23 11:46:42 2016 +0100
@@ -39,7 +39,10 @@
 #include "../OrthancException.h"
 #include "../ChunkedBuffer.h"
 #include "../Toolbox.h"
-#include "../SystemToolbox.h"
+
+#if ORTHANC_SANDBOXED == 0
+#  include "../SystemToolbox.h"
+#endif
 
 
 // http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-4