comparison Resources/Patches/dcmtk-3.6.2.patch @ 3593:0301f59450fe

improved the patch for loading DICOM dictionary from memory
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Jan 2020 17:58:15 +0100
parents Resources/Patches/dcmtk-3.6.2-cmath.patch@61fdb06e389a
children
comparison
equal deleted inserted replaced
3592:de1665e7b341 3593:0301f59450fe
1 diff -urEb dcmtk-3.6.2.orig/CMake/GenerateDCMTKConfigure.cmake dcmtk-3.6.2/CMake/GenerateDCMTKConfigure.cmake
2 --- dcmtk-3.6.2.orig/CMake/GenerateDCMTKConfigure.cmake 2020-01-06 17:42:52.299540389 +0100
3 +++ dcmtk-3.6.2/CMake/GenerateDCMTKConfigure.cmake 2020-01-06 17:43:56.707520036 +0100
4 @@ -568,12 +568,12 @@
5 ENDIF(HAVE_CSTDDEF)
6
7 CHECK_FUNCTIONWITHHEADER_EXISTS(feenableexcept "${HEADERS}" HAVE_PROTOTYPE_FEENABLEEXCEPT)
8 - CHECK_FUNCTIONWITHHEADER_EXISTS(isinf "${HEADERS}" HAVE_PROTOTYPE_ISINF)
9 - CHECK_FUNCTIONWITHHEADER_EXISTS(isnan "${HEADERS}" HAVE_PROTOTYPE_ISNAN)
10 - CHECK_FUNCTIONWITHHEADER_EXISTS(finite "${HEADERS}" HAVE_PROTOTYPE_FINITE)
11 - CHECK_FUNCTIONWITHHEADER_EXISTS(std::isinf "${HEADERS}" HAVE_PROTOTYPE_STD__ISINF)
12 - CHECK_FUNCTIONWITHHEADER_EXISTS(std::isnan "${HEADERS}" HAVE_PROTOTYPE_STD__ISNAN)
13 - CHECK_FUNCTIONWITHHEADER_EXISTS(std::finite "${HEADERS}" HAVE_PROTOTYPE_STD__FINITE)
14 + CHECK_FUNCTIONWITHHEADER_EXISTS("isinf(0.)" "${HEADERS}" HAVE_PROTOTYPE_ISINF)
15 + CHECK_FUNCTIONWITHHEADER_EXISTS("isnan(0.)" "${HEADERS}" HAVE_PROTOTYPE_ISNAN)
16 + CHECK_FUNCTIONWITHHEADER_EXISTS("finite(0.)" "${HEADERS}" HAVE_PROTOTYPE_FINITE)
17 + CHECK_FUNCTIONWITHHEADER_EXISTS("std::isinf(0.)" "${HEADERS}" HAVE_PROTOTYPE_STD__ISINF)
18 + CHECK_FUNCTIONWITHHEADER_EXISTS("std::isnan(0.)" "${HEADERS}" HAVE_PROTOTYPE_STD__ISNAN)
19 + CHECK_FUNCTIONWITHHEADER_EXISTS("std::finite(0.)" "${HEADERS}" HAVE_PROTOTYPE_STD__FINITE)
20 CHECK_FUNCTIONWITHHEADER_EXISTS(flock "${HEADERS}" HAVE_PROTOTYPE_FLOCK)
21 CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME)
22 CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname_r "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME_R)
23 diff -urEb dcmtk-3.6.2.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h dcmtk-3.6.2/dcmdata/include/dcmtk/dcmdata/dcdict.h
24 --- dcmtk-3.6.2.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h 2020-01-06 17:42:52.283540394 +0100
25 +++ dcmtk-3.6.2/dcmdata/include/dcmtk/dcmdata/dcdict.h 2020-01-06 17:46:21.711473976 +0100
26 @@ -152,6 +152,12 @@
27 /// returns an iterator to the end of the repeating tag dictionary
28 DcmDictEntryListIterator repeatingEnd() { return repDict.end(); }
29
30 + // Function by the Orthanc project to load a dictionary from a
31 + // memory buffer, which is necessary in sandboxed
32 + // environments. This is an adapted version of
33 + // DcmDataDictionary::loadDictionary().
34 + OFBool loadFromMemory(const std::string& content, OFBool errorIfAbsent = OFTrue);
35 +
36 private:
37
38 /** private undefined assignment operator
39 diff -urEb dcmtk-3.6.2.orig/dcmdata/libsrc/dcdict.cc dcmtk-3.6.2/dcmdata/libsrc/dcdict.cc
40 --- dcmtk-3.6.2.orig/dcmdata/libsrc/dcdict.cc 2020-01-06 17:42:52.287540392 +0100
41 +++ dcmtk-3.6.2/dcmdata/libsrc/dcdict.cc 2020-01-06 17:47:18.335299472 +0100
42 @@ -876,3 +876,6 @@
43 wrlock().clear();
44 unlock();
45 }
46 +
47 +
48 +#include "dcdict_orthanc.cc"