# HG changeset patch # User Sebastien Jodogne # Date 1560008550 -7200 # Node ID 3575466a3e57d877e26a73ed99723361fbda6fe4 # Parent 877363a406478dfdc41d06be3a60a9d585645dec introduction of macro HAS_ORTHANC_FRAMEWORK to be more explicit diff -r 877363a40647 -r 3575466a3e57 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp --- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Sat Jun 08 16:49:35 2019 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Sat Jun 08 17:42:30 2019 +0200 @@ -2877,19 +2877,18 @@ Internals::Protect); } - #else void MultipartRestCallback::Register(const std::string& regularExpression) { /** * Version >= 1.5.7 of the Orthanc framework must be - * available. Make sure that macros + * available. Make sure that macros "HAS_ORTHANC_FRAMEWORK=1", * "ORTHANC_FRAMEWORK_VERSION_MAJOR", * "ORTHANC_FRAMEWORK_VERSION_MINOR" and * "ORTHANC_FRAMEWORK_VERSION_REVISION" are properly set. **/ - LogError("The compatibility mode for multipart transfers is not available."); + LogError("The compatibility wrappers for multipart transfers is not available, stopping now."); ORTHANC_PLUGINS_THROW_EXCEPTION(NotImplemented); } diff -r 877363a40647 -r 3575466a3e57 Plugins/Samples/Common/OrthancPluginCppWrapper.h --- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h Sat Jun 08 16:49:35 2019 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h Sat Jun 08 17:42:30 2019 +0200 @@ -59,9 +59,11 @@ #if !defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) #define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(major, minor, revision) \ - (defined(ORTHANC_FRAMEWORK_VERSION_MAJOR) && \ + (defined(HAS_ORTHANC_FRAMEWORK) && \ + defined(ORTHANC_FRAMEWORK_VERSION_MAJOR) && \ defined(ORTHANC_FRAMEWORK_VERSION_MINOR) && \ defined(ORTHANC_FRAMEWORK_VERSION_REVISION) && \ + HAS_ORTHANC_FRAMEWORK == 1 && \ ORTHANC_FRAMEWORK_VERSION_MAJOR > major || \ (ORTHANC_FRAMEWORK_VERSION_MAJOR == major && \ (ORTHANC_FRAMEWORK_VERSION_MINOR > minor || \