Mercurial > hg > orthanc
comparison OrthancFramework/Resources/Patches/dcmtk-3.6.5.patch @ 4044:d25f4c0fa160 framework
splitting code into OrthancFramework and OrthancServer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Jun 2020 20:30:34 +0200 |
parents | Resources/Patches/dcmtk-3.6.5.patch@9d2d2c1afcec |
children | dd17d37ad950 |
comparison
equal
deleted
inserted
replaced
4043:6c6239aec462 | 4044:d25f4c0fa160 |
---|---|
1 diff -urEb dcmtk-3.6.5.orig/CMake/GenerateDCMTKConfigure.cmake dcmtk-3.6.5/CMake/GenerateDCMTKConfigure.cmake | |
2 --- dcmtk-3.6.5.orig/CMake/GenerateDCMTKConfigure.cmake 2020-06-08 22:19:03.265799573 +0200 | |
3 +++ dcmtk-3.6.5/CMake/GenerateDCMTKConfigure.cmake 2020-06-08 22:21:22.670025141 +0200 | |
4 @@ -169,6 +169,8 @@ | |
5 endif() | |
6 | |
7 # Check the sizes of various types | |
8 +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") | |
9 + # This doesn't work for wasm, Orthanc defines the macros manually | |
10 include (CheckTypeSize) | |
11 CHECK_TYPE_SIZE("char" SIZEOF_CHAR) | |
12 CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE) | |
13 @@ -177,6 +179,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.5.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h dcmtk-3.6.5/dcmdata/include/dcmtk/dcmdata/dcdict.h | |
22 --- dcmtk-3.6.5.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h 2020-06-08 22:19:03.229799498 +0200 | |
23 +++ dcmtk-3.6.5/dcmdata/include/dcmtk/dcmdata/dcdict.h 2020-06-08 22:19:35.317862998 +0200 | |
24 @@ -152,6 +152,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.5.orig/dcmdata/libsrc/dcdict.cc dcmtk-3.6.5/dcmdata/libsrc/dcdict.cc | |
38 --- dcmtk-3.6.5.orig/dcmdata/libsrc/dcdict.cc 2020-06-08 22:19:03.245799531 +0200 | |
39 +++ dcmtk-3.6.5/dcmdata/libsrc/dcdict.cc 2020-06-08 22:19:35.317862998 +0200 | |
40 @@ -900,3 +900,6 @@ | |
41 wrlock().clear(); | |
42 wrunlock(); | |
43 } | |
44 + | |
45 + | |
46 +#include "dcdict_orthanc.cc" | |
47 diff -urEb dcmtk-3.6.5.orig/dcmdata/libsrc/dcpxitem.cc dcmtk-3.6.5/dcmdata/libsrc/dcpxitem.cc | |
48 --- dcmtk-3.6.5.orig/dcmdata/libsrc/dcpxitem.cc 2020-06-08 22:19:03.245799531 +0200 | |
49 +++ dcmtk-3.6.5/dcmdata/libsrc/dcpxitem.cc 2020-06-08 22:19:35.317862998 +0200 | |
50 @@ -36,6 +36,9 @@ | |
51 #include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */ | |
52 #include "dcmtk/dcmdata/dcwcache.h" /* for class DcmWriteCache */ | |
53 | |
54 +#undef max | |
55 +#include "dcmtk/ofstd/oflimits.h" | |
56 + | |
57 | |
58 // ******************************** | |
59 | |
60 diff -urEb dcmtk-3.6.5.orig/oflog/include/dcmtk/oflog/thread/syncpub.h dcmtk-3.6.5/oflog/include/dcmtk/oflog/thread/syncpub.h | |
61 --- dcmtk-3.6.5.orig/oflog/include/dcmtk/oflog/thread/syncpub.h 2020-06-08 22:19:03.261799565 +0200 | |
62 +++ dcmtk-3.6.5/oflog/include/dcmtk/oflog/thread/syncpub.h 2020-06-08 22:19:35.317862998 +0200 | |
63 @@ -63,7 +63,7 @@ | |
64 | |
65 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
66 Mutex::Mutex (Mutex::Type t) | |
67 - : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t)) + 0) | |
68 + : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t))) | |
69 { } | |
70 | |
71 | |
72 @@ -106,7 +106,7 @@ | |
73 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
74 Semaphore::Semaphore (unsigned DCMTK_LOG4CPLUS_THREADED (max), | |
75 unsigned DCMTK_LOG4CPLUS_THREADED (initial)) | |
76 - : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial)) + 0) | |
77 + : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial))) | |
78 { } | |
79 | |
80 | |
81 @@ -148,7 +148,7 @@ | |
82 | |
83 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
84 FairMutex::FairMutex () | |
85 - : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::FairMutex) + 0) | |
86 + : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::FairMutex)) | |
87 { } | |
88 | |
89 | |
90 @@ -190,7 +190,7 @@ | |
91 | |
92 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
93 ManualResetEvent::ManualResetEvent (bool DCMTK_LOG4CPLUS_THREADED (sig)) | |
94 - : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig)) + 0) | |
95 + : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig))) | |
96 { } | |
97 | |
98 | |
99 @@ -252,7 +252,7 @@ | |
100 | |
101 DCMTK_LOG4CPLUS_INLINE_EXPORT | |
102 SharedMutex::SharedMutex () | |
103 - : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex) + 0) | |
104 + : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex)) | |
105 { } | |
106 | |
107 | |
108 diff -urEb dcmtk-3.6.5.orig/oflog/libsrc/oflog.cc dcmtk-3.6.5/oflog/libsrc/oflog.cc | |
109 --- dcmtk-3.6.5.orig/oflog/libsrc/oflog.cc 2020-06-08 22:19:03.261799565 +0200 | |
110 +++ dcmtk-3.6.5/oflog/libsrc/oflog.cc 2020-06-08 22:19:35.317862998 +0200 | |
111 @@ -19,6 +19,10 @@ | |
112 * | |
113 */ | |
114 | |
115 +#if defined(_WIN32) | |
116 +# include <winsock2.h> | |
117 +#endif | |
118 + | |
119 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ | |
120 #include "dcmtk/oflog/oflog.h" | |
121 | |
122 diff -urEb dcmtk-3.6.5.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.5/ofstd/include/dcmtk/ofstd/offile.h | |
123 --- dcmtk-3.6.5.orig/ofstd/include/dcmtk/ofstd/offile.h 2020-06-08 22:19:03.293799632 +0200 | |
124 +++ dcmtk-3.6.5/ofstd/include/dcmtk/ofstd/offile.h 2020-06-08 22:19:35.317862998 +0200 | |
125 @@ -575,7 +575,7 @@ | |
126 */ | |
127 void setlinebuf() | |
128 { | |
129 -#if defined(_WIN32) || defined(__hpux) | |
130 +#if defined(_WIN32) || defined(__hpux) || defined(__LSB_VERSION__) | |
131 this->setvbuf(NULL, _IOLBF, 0); | |
132 #else | |
133 :: setlinebuf(file_); |