Mercurial > hg > orthanc
comparison OrthancFramework/Resources/Patches/dcmtk-3.6.8.patch @ 5487:33f8e180edcf
upgraded static build to dcmtk 3.6.8
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Jan 2024 17:34:33 +0100 |
parents | |
children | 50910d241dd7 |
comparison
equal
deleted
inserted
replaced
5486:e85bd2589ea6 | 5487:33f8e180edcf |
---|---|
1 diff -urEb dcmtk-DCMTK-3.6.8.orig/CMake/GenerateDCMTKConfigure.cmake dcmtk-DCMTK-3.6.8/CMake/GenerateDCMTKConfigure.cmake | |
2 --- dcmtk-DCMTK-3.6.8.orig/CMake/GenerateDCMTKConfigure.cmake 2024-01-09 17:13:10.329673608 +0100 | |
3 +++ dcmtk-DCMTK-3.6.8/CMake/GenerateDCMTKConfigure.cmake 2024-01-09 17:14:02.273162467 +0100 | |
4 @@ -224,6 +224,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 @@ -231,6 +233,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-DCMTK-3.6.8.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h dcmtk-DCMTK-3.6.8/dcmdata/include/dcmtk/dcmdata/dcdict.h | |
22 --- dcmtk-DCMTK-3.6.8.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h 2024-01-09 17:13:10.337673529 +0100 | |
23 +++ dcmtk-DCMTK-3.6.8/dcmdata/include/dcmtk/dcmdata/dcdict.h 2024-01-09 17:14:37.920812548 +0100 | |
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-DCMTK-3.6.8.orig/dcmdata/libsrc/dcdict.cc dcmtk-DCMTK-3.6.8/dcmdata/libsrc/dcdict.cc | |
38 --- dcmtk-DCMTK-3.6.8.orig/dcmdata/libsrc/dcdict.cc 2024-01-09 17:13:10.337673529 +0100 | |
39 +++ dcmtk-DCMTK-3.6.8/dcmdata/libsrc/dcdict.cc 2024-01-09 17:15:05.240544817 +0100 | |
40 @@ -914,3 +914,5 @@ | |
41 wrlock().clear(); | |
42 wrunlock(); | |
43 } | |
44 + | |
45 +#include "dcdict_orthanc.cc" | |
46 diff -urEb dcmtk-DCMTK-3.6.8.orig/dcmdata/libsrc/dcpxitem.cc dcmtk-DCMTK-3.6.8/dcmdata/libsrc/dcpxitem.cc | |
47 --- dcmtk-DCMTK-3.6.8.orig/dcmdata/libsrc/dcpxitem.cc 2024-01-09 17:13:10.337673529 +0100 | |
48 +++ dcmtk-DCMTK-3.6.8/dcmdata/libsrc/dcpxitem.cc 2024-01-09 17:15:23.592365175 +0100 | |
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-DCMTK-3.6.8.orig/oflog/include/dcmtk/oflog/thread/syncpub.h dcmtk-DCMTK-3.6.8/oflog/include/dcmtk/oflog/thread/syncpub.h | |
60 --- dcmtk-DCMTK-3.6.8.orig/oflog/include/dcmtk/oflog/thread/syncpub.h 2024-01-09 17:13:10.389673016 +0100 | |
61 +++ dcmtk-DCMTK-3.6.8/oflog/include/dcmtk/oflog/thread/syncpub.h 2024-01-09 17:16:17.775835681 +0100 | |
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-DCMTK-3.6.8.orig/oflog/libsrc/oflog.cc dcmtk-DCMTK-3.6.8/oflog/libsrc/oflog.cc | |
99 --- dcmtk-DCMTK-3.6.8.orig/oflog/libsrc/oflog.cc 2024-01-09 17:13:10.389673016 +0100 | |
100 +++ dcmtk-DCMTK-3.6.8/oflog/libsrc/oflog.cc 2024-01-09 17:16:35.095666693 +0100 | |
101 @@ -19,6 +19,11 @@ | |
102 * | |
103 */ | |
104 | |
105 + | |
106 +#if defined(_WIN32) | |
107 +# include <winsock2.h> | |
108 +#endif | |
109 + | |
110 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ | |
111 #include "dcmtk/oflog/oflog.h" | |
112 | |
113 diff -urEb dcmtk-DCMTK-3.6.8.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-DCMTK-3.6.8/ofstd/include/dcmtk/ofstd/offile.h | |
114 --- dcmtk-DCMTK-3.6.8.orig/ofstd/include/dcmtk/ofstd/offile.h 2024-01-09 17:13:10.389673016 +0100 | |
115 +++ dcmtk-DCMTK-3.6.8/ofstd/include/dcmtk/ofstd/offile.h 2024-01-09 17:17:00.679417299 +0100 | |
116 @@ -570,7 +570,7 @@ | |
117 */ | |
118 void setlinebuf() | |
119 { | |
120 -#if defined(_WIN32) || defined(__hpux) | |
121 +#if defined(_WIN32) || defined(__hpux) || defined(__LSB_VERSION__) | |
122 this->setvbuf(NULL, _IOLBF, 0); | |
123 #else | |
124 :: setlinebuf(file_); |