annotate Resources/Patches/dcmtk-3.6.4.patch @ 3595:0080c9b492e5

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Jan 2020 18:02:21 +0100
parents 0301f59450fe
children f2df51bff2fd
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
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
2 --- dcmtk-3.6.4.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h 2020-01-06 17:38:11.323628123 +0100
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
3 +++ dcmtk-3.6.4/dcmdata/include/dcmtk/dcmdata/dcdict.h 2020-01-06 17:39:29.519603910 +0100
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
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
18 --- dcmtk-3.6.4.orig/dcmdata/libsrc/dcdict.cc 2020-01-06 17:38:11.327628121 +0100
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
19 +++ dcmtk-3.6.4/dcmdata/libsrc/dcdict.cc 2020-01-06 17:39:58.927594760 +0100
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
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
28 --- dcmtk-3.6.4.orig/dcmdata/libsrc/dcpxitem.cc 2020-01-06 17:38:11.327628121 +0100
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
29 +++ dcmtk-3.6.4/dcmdata/libsrc/dcpxitem.cc 2020-01-06 17:38:14.195627236 +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
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 diff -urEb dcmtk-3.6.4.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.4/ofstd/include/dcmtk/ofstd/offile.h
3593
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
41 --- dcmtk-3.6.4.orig/ofstd/include/dcmtk/ofstd/offile.h 2020-01-06 17:38:11.371628108 +0100
0301f59450fe improved the patch for loading DICOM dictionary from memory
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3281
diff changeset
42 +++ dcmtk-3.6.4/ofstd/include/dcmtk/ofstd/offile.h 2020-01-06 17:38:14.195627236 +0100
3280
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 @@ -575,7 +575,7 @@
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 */
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 void setlinebuf()
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 -#if defined(_WIN32) || defined(__hpux)
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 +#if defined(_WIN32) || defined(__hpux) || defined(__LSB_VERSION__)
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 this->setvbuf(NULL, _IOLBF, 0);
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 #else
fddf3ceed7e5 fixing lsb and msvc builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 :: setlinebuf(file_);