Mercurial > hg > orthanc
comparison OrthancFramework/Resources/Patches/dcmtk-3.6.7.patch @ 5067:6ad2bea0e07e
upgrade to DCMTK 3.6.7
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Aug 2022 15:34:02 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5066:956a9fed0aa8 | 5067:6ad2bea0e07e |
---|---|
1 diff -urEb dcmtk-3.6.7.orig/CMake/GenerateDCMTKConfigure.cmake dcmtk-3.6.7/CMake/GenerateDCMTKConfigure.cmake | |
2 --- dcmtk-3.6.7.orig/CMake/GenerateDCMTKConfigure.cmake 2022-08-15 14:28:32.373922631 +0200 | |
3 +++ dcmtk-3.6.7/CMake/GenerateDCMTKConfigure.cmake 2022-08-15 14:29:43.341136298 +0200 | |
4 @@ -183,6 +183,8 @@ | |
5 | |
6 # Check the sizes of various types | |
7 include (CheckTypeSize) | |
8 +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") | |
9 + # This doesn't work for wasm, Orthanc defines the macros manually | |
10 CHECK_TYPE_SIZE("char" SIZEOF_CHAR) | |
11 CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE) | |
12 CHECK_TYPE_SIZE("float" SIZEOF_FLOAT) | |
13 @@ -190,6 +192,7 @@ | |
14 CHECK_TYPE_SIZE("long" SIZEOF_LONG) | |
15 CHECK_TYPE_SIZE("short" SIZEOF_SHORT) | |
16 CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P) | |
17 +endif() | |
18 | |
19 # Check for include files, libraries, and functions | |
20 include("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryCompile.cmake") | |
21 diff -urEb dcmtk-3.6.7.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdict.h | |
22 --- dcmtk-3.6.7.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h 2022-08-15 14:28:32.421922100 +0200 | |
23 +++ dcmtk-3.6.7/dcmdata/include/dcmtk/dcmdata/dcdict.h 2022-08-15 14:30:16.224771418 +0200 | |
24 @@ -162,6 +162,12 @@ | |
25 /// returns an iterator to the end of the repeating tag dictionary | |
26 DcmDictEntryListIterator repeatingEnd() { return repDict.end(); } | |
27 | |
28 + // Function by the Orthanc project to load a dictionary from a | |
29 + // memory buffer, which is necessary in sandboxed | |
30 + // environments. This is an adapted version of | |
31 + // DcmDataDictionary::loadDictionary(). | |
32 + OFBool loadFromMemory(const std::string& content, OFBool errorIfAbsent = OFTrue); | |
33 + | |
34 private: | |
35 | |
36 /** private undefined assignment operator | |
37 diff -urEb dcmtk-3.6.7.orig/dcmdata/libsrc/dcdict.cc dcmtk-3.6.7/dcmdata/libsrc/dcdict.cc | |
38 --- dcmtk-3.6.7.orig/dcmdata/libsrc/dcdict.cc 2022-08-15 14:28:32.421922100 +0200 | |
39 +++ dcmtk-3.6.7/dcmdata/libsrc/dcdict.cc 2022-08-15 14:31:15.220116058 +0200 | |
40 @@ -892,3 +892,5 @@ | |
41 wrlock().clear(); | |
42 wrunlock(); | |
43 } | |
44 + | |
45 +#include "dcdict_orthanc.cc" | |
46 diff -urEb dcmtk-3.6.7.orig/dcmdata/libsrc/dcpxitem.cc dcmtk-3.6.7/dcmdata/libsrc/dcpxitem.cc | |
47 --- dcmtk-3.6.7.orig/dcmdata/libsrc/dcpxitem.cc 2022-08-15 14:28:32.425922056 +0200 | |
48 +++ dcmtk-3.6.7/dcmdata/libsrc/dcpxitem.cc 2022-08-15 14:31:28.887964099 +0200 | |
49 @@ -31,6 +31,9 @@ | |
50 #include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */ | |
51 #include "dcmtk/dcmdata/dcwcache.h" /* for class DcmWriteCache */ | |
52 | |
53 +#undef max | |
54 +#include "dcmtk/ofstd/oflimits.h" | |
55 + | |
56 | |
57 // ******************************** | |
58 | |
59 diff -urEb dcmtk-3.6.7.orig/oflog/include/dcmtk/oflog/thread/syncpub.h dcmtk-3.6.7/oflog/include/dcmtk/oflog/thread/syncpub.h | |
60 --- dcmtk-3.6.7.orig/oflog/include/dcmtk/oflog/thread/syncpub.h 2022-08-15 14:28:32.401922322 +0200 | |
61 +++ dcmtk-3.6.7/oflog/include/dcmtk/oflog/thread/syncpub.h 2022-08-15 14:31:52.415702413 +0200 | |
62 @@ -63,7 +63,7 @@ | |
63 | |
64 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
65 Mutex::Mutex (Mutex::Type t) | |
66 - : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t) + 0)) | |
67 + : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t))) | |
68 { } | |
69 | |
70 | |
71 @@ -106,7 +106,7 @@ | |
72 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
73 Semaphore::Semaphore (unsigned DCMTK_LOG4CPLUS_THREADED (max), | |
74 unsigned DCMTK_LOG4CPLUS_THREADED (initial)) | |
75 - : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial) + 0)) | |
76 + : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial))) | |
77 { } | |
78 | |
79 | |
80 @@ -190,7 +190,7 @@ | |
81 | |
82 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
83 ManualResetEvent::ManualResetEvent (bool DCMTK_LOG4CPLUS_THREADED (sig)) | |
84 - : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig) + 0)) | |
85 + : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig))) | |
86 { } | |
87 | |
88 | |
89 @@ -252,7 +252,7 @@ | |
90 | |
91 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
92 SharedMutex::SharedMutex () | |
93 - : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex + 0)) | |
94 + : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex)) | |
95 { } | |
96 | |
97 | |
98 diff -urEb dcmtk-3.6.7.orig/oflog/libsrc/oflog.cc dcmtk-3.6.7/oflog/libsrc/oflog.cc | |
99 --- dcmtk-3.6.7.orig/oflog/libsrc/oflog.cc 2022-08-15 14:28:32.405922278 +0200 | |
100 +++ dcmtk-3.6.7/oflog/libsrc/oflog.cc 2022-08-15 14:32:16.815430896 +0200 | |
101 @@ -19,6 +19,10 @@ | |
102 * | |
103 */ | |
104 | |
105 +#if defined(_WIN32) | |
106 +# include <winsock2.h> | |
107 +#endif | |
108 + | |
109 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ | |
110 #include "dcmtk/oflog/oflog.h" | |
111 | |
112 diff -urEb dcmtk-3.6.7.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/offile.h | |
113 --- dcmtk-3.6.7.orig/ofstd/include/dcmtk/ofstd/offile.h 2022-08-15 14:28:32.425922056 +0200 | |
114 +++ dcmtk-3.6.7/ofstd/include/dcmtk/ofstd/offile.h 2022-08-15 14:32:41.471156396 +0200 | |
115 @@ -570,7 +570,7 @@ | |
116 */ | |
117 void setlinebuf() | |
118 { | |
119 -#if defined(_WIN32) || defined(__hpux) | |
120 +#if defined(_WIN32) || defined(__hpux) || defined(__LSB_VERSION__) | |
121 this->setvbuf(NULL, _IOLBF, 0); | |
122 #else | |
123 :: setlinebuf(file_); |