annotate OrthancFramework/Resources/Patches/dcmtk-3.6.4.patch @ 5169:8b74aa4f3515

enforce the existence of the patient/study/instance while creating its archive
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 24 Feb 2023 18:07:35 +0100
parents d25f4c0fa160
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
1 diff -urEb dcmtk-3.6.4.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h dcmtk-3.6.4/dcmdata/include/dcmtk/dcmdata/dcdict.h
3598
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
2 --- dcmtk-3.6.4.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h 2020-01-06 19:55:12.887153062 +0100
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
3 +++ dcmtk-3.6.4/dcmdata/include/dcmtk/dcmdata/dcdict.h 2020-01-06 19:55:28.156447233 +0100
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
4 @@ -152,6 +152,12 @@
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
5 /// returns an iterator to the end of the repeating tag dictionary
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
6 DcmDictEntryListIterator repeatingEnd() { return repDict.end(); }
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
7
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
8 + // Function by the Orthanc project to load a dictionary from a
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
9 + // memory buffer, which is necessary in sandboxed
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
10 + // environments. This is an adapted version of
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
11 + // DcmDataDictionary::loadDictionary().
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
12 + OFBool loadFromMemory(const std::string& content, OFBool errorIfAbsent = OFTrue);
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
13 +
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
14 private:
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
15
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
16 /** private undefined assignment operator
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
17 diff -urEb dcmtk-3.6.4.orig/dcmdata/libsrc/dcdict.cc dcmtk-3.6.4/dcmdata/libsrc/dcdict.cc
3598
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
18 --- dcmtk-3.6.4.orig/dcmdata/libsrc/dcdict.cc 2020-01-06 19:55:12.899154075 +0100
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
19 +++ dcmtk-3.6.4/dcmdata/libsrc/dcdict.cc 2020-01-06 19:55:28.156447233 +0100
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
20 @@ -899,3 +899,6 @@
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
21 wrlock().clear();
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
22 wrunlock();
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
23 }
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
24 +
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
25 +
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
26 +#include "dcdict_orthanc.cc"
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 diff -urEb dcmtk-3.6.4.orig/dcmdata/libsrc/dcpxitem.cc dcmtk-3.6.4/dcmdata/libsrc/dcpxitem.cc
3598
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
28 --- dcmtk-3.6.4.orig/dcmdata/libsrc/dcpxitem.cc 2020-01-06 19:55:12.899154075 +0100
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
29 +++ dcmtk-3.6.4/dcmdata/libsrc/dcpxitem.cc 2020-01-06 19:55:28.156447233 +0100
3281
ea54109a7312 upgrade to GoogleTest 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
30 @@ -36,6 +36,9 @@
ea54109a7312 upgrade to GoogleTest 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
31 #include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */
ea54109a7312 upgrade to GoogleTest 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
32 #include "dcmtk/dcmdata/dcwcache.h" /* for class DcmWriteCache */
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
3281
ea54109a7312 upgrade to GoogleTest 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
34 +#undef max
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 +#include "dcmtk/ofstd/oflimits.h"
3281
ea54109a7312 upgrade to GoogleTest 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
36 +
ea54109a7312 upgrade to GoogleTest 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
37
ea54109a7312 upgrade to GoogleTest 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
38 // ********************************
ea54109a7312 upgrade to GoogleTest 1.8.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3280
diff changeset
39
3598
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
40 diff -urEb dcmtk-3.6.4.orig/oflog/include/dcmtk/oflog/thread/syncpub.h dcmtk-3.6.4/oflog/include/dcmtk/oflog/thread/syncpub.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
41 --- dcmtk-3.6.4.orig/oflog/include/dcmtk/oflog/thread/syncpub.h 2020-01-06 19:55:12.911155088 +0100
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
42 +++ dcmtk-3.6.4/oflog/include/dcmtk/oflog/thread/syncpub.h 2020-01-06 19:56:26.991372656 +0100
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
43 @@ -63,7 +63,7 @@
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
44
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
45 DCMTK_LOG4CPLUS_INLINE_EXPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
46 Mutex::Mutex (Mutex::Type t)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
47 - : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t)) + 0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
48 + : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t)))
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
49 { }
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
50
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
51
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
52 @@ -106,7 +106,7 @@
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
53 DCMTK_LOG4CPLUS_INLINE_EXPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
54 Semaphore::Semaphore (unsigned DCMTK_LOG4CPLUS_THREADED (max),
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
55 unsigned DCMTK_LOG4CPLUS_THREADED (initial))
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
56 - : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial)) + 0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
57 + : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial)))
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
58 { }
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
59
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
60
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
61 @@ -148,7 +148,7 @@
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
62
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
63 DCMTK_LOG4CPLUS_INLINE_EXPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
64 FairMutex::FairMutex ()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
65 - : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::FairMutex) + 0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
66 + : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::FairMutex))
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
67 { }
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
68
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
69
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
70 @@ -190,7 +190,7 @@
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
71
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
72 DCMTK_LOG4CPLUS_INLINE_EXPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
73 ManualResetEvent::ManualResetEvent (bool DCMTK_LOG4CPLUS_THREADED (sig))
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
74 - : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig)) + 0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
75 + : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig)))
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
76 { }
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
77
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
78
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
79 @@ -252,7 +252,7 @@
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
80
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
81 DCMTK_LOG4CPLUS_INLINE_EXPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
82 SharedMutex::SharedMutex ()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
83 - : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex) + 0)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
84 + : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex))
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
85 { }
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
86
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
87
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 diff -urEb dcmtk-3.6.4.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.4/ofstd/include/dcmtk/ofstd/offile.h
3598
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
89 --- dcmtk-3.6.4.orig/ofstd/include/dcmtk/ofstd/offile.h 2020-01-06 19:55:12.951158464 +0100
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3593
diff changeset
90 +++ dcmtk-3.6.4/ofstd/include/dcmtk/ofstd/offile.h 2020-01-06 19:55:28.156447233 +0100
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 @@ -575,7 +575,7 @@
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 */
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 void setlinebuf()
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 {
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 -#if defined(_WIN32) || defined(__hpux)
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 +#if defined(_WIN32) || defined(__hpux) || defined(__LSB_VERSION__)
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 this->setvbuf(NULL, _IOLBF, 0);
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 #else
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 :: setlinebuf(file_);