Mercurial > hg > orthanc
changeset 5961:92a5f2f655b6
upgraded dcmtk to 3.6.9
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 16 Jan 2025 17:11:27 +0100 |
parents | 9fa420a3067e |
children | cb76465d0245 |
files | NEWS OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.6.9.cmake OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake OrthancFramework/Resources/Patches/dcmtk-3.6.9-visual-studio.patch OrthancFramework/Resources/Patches/dcmtk-3.6.9.patch |
diffstat | 6 files changed, 1428 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Thu Jan 16 16:38:02 2025 +0100 +++ b/NEWS Thu Jan 16 17:11:27 2025 +0100 @@ -9,6 +9,11 @@ the number of concurrent DCMTK transcoders that are simultaneously running at any given time. +Plugins +------- + +* SDK: added OrthancPluginStartStreamAnswer() and OrthancPluginSendStreamChunk() to allow + sending HTTP response by chunks. Maintenance ----------- @@ -27,13 +32,8 @@ in the series. * optimized /archive to use the "ExtendedFind" extension and reduce the number of SQL queries. - - -Plugins -------- - -* SDK: added OrthancPluginStartStreamAnswer and OrthancPluginSendStreamChunk to allow - sending HTTP response by chunks. +* Upgraded dependencies for static builds: + - dcmtk 3.6.9 Version 1.12.5 (2024-12-17)
--- a/OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake Thu Jan 16 16:38:02 2025 +0100 +++ b/OrthancFramework/Resources/CMake/DcmtkConfiguration.cmake Thu Jan 16 17:11:27 2025 +0100 @@ -39,6 +39,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.7.cmake) elseif (DCMTK_STATIC_VERSION STREQUAL "3.6.8") include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.8.cmake) + elseif (DCMTK_STATIC_VERSION STREQUAL "3.6.9") + include(${CMAKE_CURRENT_LIST_DIR}/DcmtkConfigurationStatic-3.6.9.cmake) else() message(FATAL_ERROR "Unsupported version of DCMTK: ${DCMTK_STATIC_VERSION}") endif()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.6.9.cmake Thu Jan 16 17:11:27 2025 +0100 @@ -0,0 +1,286 @@ +# Orthanc - A Lightweight, RESTful DICOM Store +# Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics +# Department, University Hospital of Liege, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2024 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/>. + + +SET(DCMTK_VERSION_NUMBER 369) +SET(DCMTK_PACKAGE_VERSION "3.6.9") +SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.9) +SET(DCMTK_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/dcmtk-3.6.9.tar.gz") +SET(DCMTK_MD5 "cb30587f8da760c832a4f19d159acda5") + +macro(DCMTK_UNSET) +endmacro() + +macro(DCMTK_UNSET_CACHE) +endmacro() + +set(DCMTK_BINARY_DIR ${DCMTK_SOURCES_DIR}/) +set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/) + +if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set(DCMTK_WITH_THREADS OFF) # Disable thread support in wasm/asm.js +else() + set(DCMTK_WITH_THREADS ON) +endif() + +add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1) + +if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}") + set(FirstRun OFF) +else() + set(FirstRun ON) +endif() + +DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}") + + +if (FirstRun) + # Apply the patches + execute_process( + COMMAND ${PATCH_EXECUTABLE} -p0 -N -i + ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-3.6.9.patch + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE Failure + ) + + if (Failure) + message(FATAL_ERROR "Error while patching a file") + endif() + + if (MSVC) + # Older versions of Microsoft Visual Studio (notably MSVC2008) + # don't like void usage of function arguments in C source files, + # in order to avoid a warning about unused arguments. This patch + # removes such usages that were not present in DCMTK <= 3.6.6. + execute_process( + COMMAND ${PATCH_EXECUTABLE} -p0 -N -i + ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-3.6.9-visual-studio.patch + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE Failure + ) + + if (Failure) + message(FATAL_ERROR "Error while patching a file") + endif() + endif() + + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-dcdict_orthanc.cc + ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict_orthanc.cc + COPYONLY) +else() + message("The patches for DCMTK have already been applied") +endif() + + +include_directories( + ${DCMTK_SOURCES_DIR}/dcmiod/include + ${DCMTK_SOURCES_DIR}/oficonv/include + ) + + +# C_CHAR_UNSIGNED *must* be set before calling "GenerateDCMTKConfigure.cmake" +IF (CMAKE_CROSSCOMPILING) + if (CMAKE_COMPILER_IS_GNUCXX AND + CMAKE_SYSTEM_NAME STREQUAL "Windows") # MinGW + SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.") + + elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # WebAssembly or asm.js + + # Check out "../WebAssembly/ArithmeticTests/" to regenerate the + # "arith.h" file + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/WebAssembly/arith.h + ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/arith.h + COPYONLY) + + UNSET(C_CHAR_UNSIGNED CACHE) + SET(C_CHAR_UNSIGNED 0 CACHE INTERNAL "") + + else() + message(FATAL_ERROR "Support your platform here") + endif() +ENDIF() + + +if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") + SET(DCMTK_ENABLE_CHARSET_CONVERSION "iconv" CACHE STRING "") + SET(HAVE_SYS_GETTID 0 CACHE INTERNAL "") +endif() + + +SET(DCMTK_SOURCE_DIR ${DCMTK_SOURCES_DIR}) +include(GNUInstallDirs) # Needed since DCMTK 3.6.9 +include(${DCMTK_SOURCES_DIR}/CMake/CheckFunctionWithHeaderExists.cmake) +include(${DCMTK_SOURCES_DIR}/CMake/GenerateDCMTKConfigure.cmake) + + +if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # WebAssembly or + # asm.js The macros below are not properly discovered by DCMTK + # when using WebAssembly. Check out "../WebAssembly/arith.h" for + # how we produced these values. This step MUST be after + # "GenerateDCMTKConfigure" and before the generation of + # "osconfig.h". + UNSET(SIZEOF_VOID_P CACHE) + UNSET(SIZEOF_CHAR CACHE) + UNSET(SIZEOF_DOUBLE CACHE) + UNSET(SIZEOF_FLOAT CACHE) + UNSET(SIZEOF_INT CACHE) + UNSET(SIZEOF_LONG CACHE) + UNSET(SIZEOF_SHORT CACHE) + UNSET(SIZEOF_VOID_P CACHE) + + SET(SIZEOF_VOID_P 4 CACHE INTERNAL "") + SET(SIZEOF_CHAR 1 CACHE INTERNAL "") + SET(SIZEOF_DOUBLE 8 CACHE INTERNAL "") + SET(SIZEOF_FLOAT 4 CACHE INTERNAL "") + SET(SIZEOF_INT 4 CACHE INTERNAL "") + SET(SIZEOF_LONG 4 CACHE INTERNAL "") + SET(SIZEOF_SHORT 2 CACHE INTERNAL "") + SET(SIZEOF_VOID_P 4 CACHE INTERNAL "") +endif() + + +set(DCMTK_PACKAGE_VERSION_SUFFIX "") +set(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_VERSION_NUMBER}) + + +# For the dcmtls module, necessary since DCMTK 3.6.7 (cf. file +# "dcmtls/libsrc/tlslayer.cc"). This must be done before the +# invokation of "configure_file()"! +if (STATIC_BUILD OR NOT USE_SYSTEM_OPENSSL) + # The "CHECK_FUNCTIONWITHHEADER_EXISTS()" provided by DCMTK only + # works with the system-wide version of OpenSSL. If statically + # linking against OpenSSL, we manually provide information about + # OpenSSL 3.0.x + set(HAVE_OPENSSL_PROTOTYPE_DH_BITS 1) + set(HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID 1) + set(HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM 1) + set(HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE 1) + set(HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS 1) + set(HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID 1) + set(HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM 1) +else() + CHECK_FUNCTIONWITHHEADER_EXISTS("DH_bits" "openssl/dh.h" HAVE_OPENSSL_PROTOTYPE_DH_BITS) + CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_base_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_cert_store" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE) + CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_ciphers" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS) + CHECK_FUNCTIONWITHHEADER_EXISTS("X509_STORE_get0_param" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM) + CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get_signature_nid" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID) +endif() + + +# "DCMTK_ENABLE_CHARSET_CONVERSION" is defined by "osconfig.h.in" +if (NOT DEFINED BOOST_LOCALE_BACKEND OR # This is the case if locale support is disabled (e.g. in Stone) + BOOST_LOCALE_BACKEND STREQUAL "gcc") + set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV" CACHE STRING "" FORCE) +elseif (BOOST_LOCALE_BACKEND STREQUAL "libiconv") + set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_ICONV" CACHE STRING "" FORCE) +elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") + set(DCMTK_ENABLE_CHARSET_CONVERSION "DCMTK_CHARSET_CONVERSION_ICU" CACHE STRING "" FORCE) +else() + message(FATAL_ERROR "Invalid value for BOOST_LOCALE_BACKEND: ${BOOST_LOCALE_BACKEND}") +endif() + +CONFIGURE_FILE( + ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in + ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h) + + + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + link_libraries(netapi32) # For NetWkstaUserGetInfo@12 + link_libraries(iphlpapi) # For GetAdaptersInfo@8 + + # Configure Wine if cross-compiling for Windows + if (CMAKE_COMPILER_IS_GNUCXX) + include(${DCMTK_SOURCES_DIR}/CMake/dcmtkUseWine.cmake) + FIND_PROGRAM(WINE_WINE_PROGRAM wine) + FIND_PROGRAM(WINE_WINEPATH_PROGRAM winepath) + list(APPEND DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=-static") + endif() +endif() + +# This step must be after the generation of "osconfig.h" => Removed since DCMTK 3.6.9 +#if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") +# INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES() +#endif() + + +# Source for the logging facility of DCMTK +AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/oflog/libsrc DCMTK_SOURCES) +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR + ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR + ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR + ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR + ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" OR + ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten") + list(REMOVE_ITEM DCMTK_SOURCES + ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc + ${DCMTK_SOURCES_DIR}/oflog/libsrc/windebap.cc + ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc + ) + +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + list(REMOVE_ITEM DCMTK_SOURCES + ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc + ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc + ) +endif() + + +# Starting with DCMTK 3.6.2, the Nagle algorithm is not disabled by +# default since this does not seem to be appropriate (anymore) for +# most modern operating systems. In order to change this default, the +# environment variable NO_TCPDELAY can be set to "1" (see envvars.txt +# for details). Alternatively, the macro DISABLE_NAGLE_ALGORITHM can +# be defined to change this setting at compilation time (see +# macros.txt for details). +# https://forum.dcmtk.org/viewtopic.php?t=4632 +add_definitions( + -DDISABLE_NAGLE_ALGORITHM=1 + ) + + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + # For compatibility with Windows XP, avoid using fiber-local-storage + # in log4cplus, but use thread-local-storage instead. Otherwise, + # Windows XP complains about missing "FlsGetValue()" in KERNEL32.dll + add_definitions( + -DDCMTK_LOG4CPLUS_AVOID_WIN32_FLS + ) + + if (CMAKE_COMPILER_IS_GNUCXX OR # MinGW + "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # MSVC for 32bit (*) + + # (*) With multithreaded logging enabled, Visual Studio 2008 fails + # with error: ".\dcmtk-3.6.7\oflog\libsrc\globinit.cc(422) : error + # C2664: 'dcmtk::log4cplus::thread::impl::tls_init' : cannot + # convert parameter 1 from 'void (__stdcall *)(void *)' to + # 'dcmtk::log4cplus::thread::impl::tls_init_cleanup_func_type'" + # None of the functions with this name in scope match the target type + + add_definitions( + -DDCMTK_LOG4CPLUS_SINGLE_THREADED + ) + endif() +endif()
--- a/OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake Thu Jan 16 16:38:02 2025 +0100 +++ b/OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake Thu Jan 16 17:11:27 2025 +0100 @@ -79,7 +79,7 @@ # Parameters specific to DCMTK set(DCMTK_DICTIONARY_DIR "" CACHE PATH "Directory containing the DCMTK dictionaries \"dicom.dic\" and \"private.dic\" (only when using system version of DCMTK)") -set(DCMTK_STATIC_VERSION "3.6.8" CACHE STRING "Version of DCMTK to be used in static builds (can be \"3.6.0\", \"3.6.2\", \"3.6.4\", \"3.6.5\", \"3.6.6\", \"3.6.7\", or \"3.6.8\")") +set(DCMTK_STATIC_VERSION "3.6.9" CACHE STRING "Version of DCMTK to be used in static builds (can be \"3.6.0\", \"3.6.2\", \"3.6.4\", \"3.6.5\", \"3.6.6\", \"3.6.7\", \"3.6.8\", or \"3.6.9\")") set(USE_DCMTK_362_PRIVATE_DIC ON CACHE BOOL "Use the dictionary of private tags from DCMTK 3.6.2 if using DCMTK 3.6.0") set(USE_SYSTEM_DCMTK ON CACHE BOOL "Use the system version of DCMTK") set(ENABLE_DCMTK_LOG ON CACHE BOOL "Enable logging internal to DCMTK")
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OrthancFramework/Resources/Patches/dcmtk-3.6.9-visual-studio.patch Thu Jan 16 17:11:27 2025 +0100 @@ -0,0 +1,995 @@ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jccoefct.c dcmtk-3.6.9/dcmjpeg/libijg12/jccoefct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jccoefct.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jccoefct.c 2025-01-16 17:05:48.524870232 +0100 +@@ -343,7 +343,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; + c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; + JDIMENSION MCU_col_num; /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jcdiffct.c dcmtk-3.6.9/dcmjpeg/libijg12/jcdiffct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jcdiffct.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jcdiffct.c 2025-01-16 17:05:51.293848896 +0100 +@@ -302,7 +302,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; + c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private; + /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jcpred.c dcmtk-3.6.9/dcmjpeg/libijg12/jcpred.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jcpred.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jcpred.c 2025-01-16 17:05:54.643823083 +0100 +@@ -213,7 +213,7 @@ + const JSAMPROW input_buf, JSAMPROW prev_row, + JDIFFROW diff_buf, JDIMENSION width) + { +- (void)prev_row; ++ //(void)prev_row; + DIFFERENCE_1D(INITIAL_PREDICTORx); + + /* +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jctrans.c dcmtk-3.6.9/dcmjpeg/libijg12/jctrans.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jctrans.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jctrans.c 2025-01-16 17:05:56.836806184 +0100 +@@ -267,7 +267,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; + c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; + JDIMENSION MCU_col_num; /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdmerge.c dcmtk-3.6.9/dcmjpeg/libijg12/jdmerge.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdmerge.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jdmerge.c 2025-01-16 17:05:59.938782281 +0100 +@@ -148,7 +148,7 @@ + JDIMENSION out_rows_avail) + /* 2:1 vertical sampling case: may need a spare row. */ + { +- (void) in_row_groups_avail; ++ //(void) in_row_groups_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPROW work_ptrs[2]; + JDIMENSION num_rows; /* number of rows returned to caller */ +@@ -198,8 +198,8 @@ + JDIMENSION out_rows_avail) + /* 1:1 vertical sampling case: much easier, never need a spare row. */ + { +- (void) in_row_groups_avail; +- (void) out_rows_avail; ++ //(void) in_row_groups_avail; ++ //(void) out_rows_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Just do the upsampling. */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdpostct.c dcmtk-3.6.9/dcmjpeg/libijg12/jdpostct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdpostct.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jdpostct.c 2025-01-16 17:06:03.508754769 +0100 +@@ -161,8 +161,8 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void) output_buf; +- (void) out_rows_avail; ++ //(void) output_buf; ++ //(void) out_rows_avail; + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION old_next_row, num_rows; + +@@ -207,9 +207,9 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void) input_buf; +- (void) in_row_group_ctr; +- (void) in_row_groups_avail; ++ //(void) input_buf; ++ //(void) in_row_group_ctr; ++ //(void) in_row_groups_avail; + + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdpred.c dcmtk-3.6.9/dcmjpeg/libijg12/jdpred.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdpred.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jdpred.c 2025-01-16 17:06:10.668699592 +0100 +@@ -101,8 +101,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_1D(INITIAL_PREDICTOR2); + } + +@@ -111,8 +111,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR2); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -123,8 +123,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR3); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -135,8 +135,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR4); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -147,8 +147,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR5); + JPEG_UNUSED(Rc); +@@ -160,8 +160,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR6); + JPEG_UNUSED(Rc); +@@ -173,8 +173,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR7); + JPEG_UNUSED(Rc); +@@ -195,7 +195,7 @@ + JDIFFROW undiff_buf, JDIMENSION width) + { + +- (void)prev_row; ++ //(void)prev_row; + j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec; + + UNDIFFERENCE_1D(INITIAL_PREDICTORx); +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdsample.c dcmtk-3.6.9/dcmjpeg/libijg12/jdsample.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdsample.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jdsample.c 2025-01-16 17:06:15.590661660 +0100 +@@ -92,7 +92,7 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void)in_row_groups_avail; ++ //(void)in_row_groups_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int ci; + jpeg_component_info * compptr; +@@ -158,8 +158,8 @@ + fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)cinfo; +- (void)compptr; ++ //(void)cinfo; ++ //(void)compptr; + *output_data_ptr = input_data; + } + +@@ -173,9 +173,9 @@ + noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)cinfo; +- (void)compptr; +- (void)input_data; ++ //(void)cinfo; ++ //(void)compptr; ++ //(void)input_data; + *output_data_ptr = NULL; /* safety check */ + } + +@@ -239,7 +239,7 @@ + h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)compptr; ++ //(void)compptr; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; +@@ -268,7 +268,7 @@ + h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)compptr; ++ //(void)compptr; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdscale.c dcmtk-3.6.9/dcmjpeg/libijg12/jdscale.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jdscale.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jdscale.c 2025-01-16 17:06:18.349640397 +0100 +@@ -67,7 +67,7 @@ + const JDIFFROW diff_buf, JSAMPROW output_buf, + JDIMENSION width) + { +- (void)cinfo; ++ //(void)cinfo; + unsigned int xindex; + + for (xindex = 0; xindex < width; xindex++) +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jquant1.c dcmtk-3.6.9/dcmjpeg/libijg12/jquant1.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jquant1.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jquant1.c 2025-01-16 17:06:23.011604468 +0100 +@@ -251,8 +251,8 @@ + * (Forcing the upper and lower values to the limits ensures that + * dithering can't produce a color outside the selected gamut.) + */ +- (void) cinfo; +- (void) ci; ++ //(void) cinfo; ++ //(void) ci; + return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj); + } + +@@ -262,8 +262,8 @@ + /* Return largest input value that should map to j'th output value */ + /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ + { +- (void) cinfo; +- (void) ci; ++ //(void) cinfo; ++ //(void) ci; + /* Breakpoints are halfway between values returned by output_value */ + return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); + } +@@ -744,7 +744,7 @@ + METHODDEF(void) + start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) + { +- (void) is_pre_scan; ++ //(void) is_pre_scan; + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; +@@ -802,7 +802,7 @@ + METHODDEF(void) + finish_pass_1_quant (j_decompress_ptr cinfo) + { +- (void) cinfo; ++ //(void) cinfo; + /* no work in 1-pass case */ + } + +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg12/jquant2.c dcmtk-3.6.9/dcmjpeg/libijg12/jquant2.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg12/jquant2.c 2025-01-16 17:00:27.129342450 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg12/jquant2.c 2025-01-16 17:06:26.060580969 +0100 +@@ -224,7 +224,7 @@ + prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) + { +- (void) output_buf; ++ //(void) output_buf; + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register JSAMPROW ptr; + register histptr histp; +@@ -1156,7 +1156,7 @@ + METHODDEF(void) + finish_pass2 (j_decompress_ptr cinfo) + { +- (void) cinfo; ++ //(void) cinfo; + /* no work */ + } + +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jccoefct.c dcmtk-3.6.9/dcmjpeg/libijg16/jccoefct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jccoefct.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jccoefct.c 2025-01-16 17:06:28.573561598 +0100 +@@ -343,7 +343,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; + c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; + JDIMENSION MCU_col_num; /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jcdiffct.c dcmtk-3.6.9/dcmjpeg/libijg16/jcdiffct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jcdiffct.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jcdiffct.c 2025-01-16 17:06:30.971543114 +0100 +@@ -302,7 +302,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; + c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private; + /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jcpred.c dcmtk-3.6.9/dcmjpeg/libijg16/jcpred.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jcpred.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jcpred.c 2025-01-16 17:06:33.308525103 +0100 +@@ -213,7 +213,7 @@ + const JSAMPROW input_buf, JSAMPROW prev_row, + JDIFFROW diff_buf, JDIMENSION width) + { +- (void)prev_row; ++ //(void)prev_row; + DIFFERENCE_1D(INITIAL_PREDICTORx); + + /* +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jctrans.c dcmtk-3.6.9/dcmjpeg/libijg16/jctrans.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jctrans.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jctrans.c 2025-01-16 17:06:35.435508707 +0100 +@@ -267,7 +267,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; + c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; + JDIMENSION MCU_col_num; /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdmerge.c dcmtk-3.6.9/dcmjpeg/libijg16/jdmerge.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdmerge.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jdmerge.c 2025-01-16 17:06:38.491485153 +0100 +@@ -169,7 +169,7 @@ + JDIMENSION out_rows_avail) + /* 2:1 vertical sampling case: may need a spare row. */ + { +- (void) in_row_groups_avail; ++ //(void) in_row_groups_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPROW work_ptrs[2]; + JDIMENSION num_rows; /* number of rows returned to caller */ +@@ -219,8 +219,8 @@ + JDIMENSION out_rows_avail) + /* 1:1 vertical sampling case: much easier, never need a spare row. */ + { +- (void) in_row_groups_avail; +- (void) out_rows_avail; ++ //(void) in_row_groups_avail; ++ //(void) out_rows_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Just do the upsampling. */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdpostct.c dcmtk-3.6.9/dcmjpeg/libijg16/jdpostct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdpostct.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jdpostct.c 2025-01-16 17:06:41.998458119 +0100 +@@ -161,8 +161,8 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void) output_buf; +- (void) out_rows_avail; ++ //(void) output_buf; ++ //(void) out_rows_avail; + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION old_next_row, num_rows; + +@@ -207,9 +207,9 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void) input_buf; +- (void) in_row_group_ctr; +- (void) in_row_groups_avail; ++ //(void) input_buf; ++ //(void) in_row_group_ctr; ++ //(void) in_row_groups_avail; + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdpred.c dcmtk-3.6.9/dcmjpeg/libijg16/jdpred.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdpred.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jdpred.c 2025-01-16 17:06:52.029380791 +0100 +@@ -101,8 +101,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_1D(INITIAL_PREDICTOR2); + } + +@@ -111,8 +111,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR2); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -123,8 +123,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR3); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -135,8 +135,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR4A); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -147,8 +147,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR4); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -159,8 +159,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR5); + JPEG_UNUSED(Rc); +@@ -172,8 +172,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR5A); + JPEG_UNUSED(Rc); +@@ -185,8 +185,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR6); + JPEG_UNUSED(Rc); +@@ -198,8 +198,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR6A); + JPEG_UNUSED(Rc); +@@ -211,8 +211,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR7); + JPEG_UNUSED(Rc); +@@ -224,8 +224,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR7A); + JPEG_UNUSED(Rc); +@@ -245,7 +245,7 @@ + const JDIFFROW diff_buf, JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)prev_row; ++ //(void)prev_row; + j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec; + + UNDIFFERENCE_1D(INITIAL_PREDICTORx); +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdsample.c dcmtk-3.6.9/dcmjpeg/libijg16/jdsample.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdsample.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jdsample.c 2025-01-16 17:06:57.388339475 +0100 +@@ -92,7 +92,7 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void)in_row_groups_avail; ++ //(void)in_row_groups_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int ci; + jpeg_component_info * compptr; +@@ -158,8 +158,8 @@ + fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)cinfo; +- (void)compptr; ++ //(void)cinfo; ++ //(void)compptr; + *output_data_ptr = input_data; + } + +@@ -173,9 +173,9 @@ + noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)cinfo; +- (void)compptr; +- (void)input_data; ++ //(void)cinfo; ++ //(void)compptr; ++ //(void)input_data; + *output_data_ptr = NULL; /* safety check */ + } + +@@ -239,7 +239,7 @@ + h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)compptr; ++ //(void)compptr; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; +@@ -268,7 +268,7 @@ + h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)compptr; ++ //(void)compptr; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdscale.c dcmtk-3.6.9/dcmjpeg/libijg16/jdscale.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jdscale.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jdscale.c 2025-01-16 17:07:00.092318628 +0100 +@@ -67,7 +67,7 @@ + const JDIFFROW diff_buf, JSAMPROW output_buf, + JDIMENSION width) + { +- (void)cinfo; ++ //(void)cinfo; + unsigned int xindex; + + for (xindex = 0; xindex < width; xindex++) +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jquant1.c dcmtk-3.6.9/dcmjpeg/libijg16/jquant1.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jquant1.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jquant1.c 2025-01-16 17:07:04.133287469 +0100 +@@ -251,8 +251,8 @@ + * (Forcing the upper and lower values to the limits ensures that + * dithering can't produce a color outside the selected gamut.) + */ +- (void) cinfo; +- (void) ci; ++ //(void) cinfo; ++ //(void) ci; + return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj); + } + +@@ -262,8 +262,8 @@ + /* Return largest input value that should map to j'th output value */ + /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ + { +- (void) cinfo; +- (void) ci; ++ //(void) cinfo; ++ //(void) ci; + /* Breakpoints are halfway between values returned by output_value */ + return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); + } +@@ -744,7 +744,7 @@ + METHODDEF(void) + start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) + { +- (void) is_pre_scan; ++ //(void) is_pre_scan; + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; +@@ -802,7 +802,7 @@ + METHODDEF(void) + finish_pass_1_quant (j_decompress_ptr cinfo) + { +- (void) cinfo; ++ //(void) cinfo; + /* no work in 1-pass case */ + } + +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg16/jquant2.c dcmtk-3.6.9/dcmjpeg/libijg16/jquant2.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg16/jquant2.c 2025-01-16 17:00:27.130342442 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg16/jquant2.c 2025-01-16 17:07:06.836266628 +0100 +@@ -224,7 +224,7 @@ + prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) + { +- (void) output_buf; ++ //(void) output_buf; + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register JSAMPROW ptr; + register histptr histp; +@@ -1156,7 +1156,7 @@ + METHODDEF(void) + finish_pass2 (j_decompress_ptr cinfo) + { +- (void) cinfo; ++ //(void) cinfo; + /* no work */ + } + +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jccoefct.c dcmtk-3.6.9/dcmjpeg/libijg8/jccoefct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jccoefct.c 2025-01-16 17:00:27.132342426 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jccoefct.c 2025-01-16 17:07:08.924250529 +0100 +@@ -343,7 +343,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; + c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; + JDIMENSION MCU_col_num; /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jcdiffct.c dcmtk-3.6.9/dcmjpeg/libijg8/jcdiffct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jcdiffct.c 2025-01-16 17:00:27.132342426 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jcdiffct.c 2025-01-16 17:07:10.996234551 +0100 +@@ -302,7 +302,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; + c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private; + /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jcpred.c dcmtk-3.6.9/dcmjpeg/libijg8/jcpred.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jcpred.c 2025-01-16 17:00:27.132342426 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jcpred.c 2025-01-16 17:07:13.003219074 +0100 +@@ -213,7 +213,7 @@ + const JSAMPROW input_buf, JSAMPROW prev_row, + JDIFFROW diff_buf, JDIMENSION width) + { +- (void)prev_row; ++ //(void)prev_row; + DIFFERENCE_1D(INITIAL_PREDICTORx); + + /* +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jctrans.c dcmtk-3.6.9/dcmjpeg/libijg8/jctrans.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jctrans.c 2025-01-16 17:00:27.132342426 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jctrans.c 2025-01-16 17:07:15.181202278 +0100 +@@ -267,7 +267,7 @@ + METHODDEF(boolean) + compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) + { +- (void)input_buf; ++ //(void)input_buf; + j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; + c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private; + JDIMENSION MCU_col_num; /* index of current MCU within row */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdmerge.c dcmtk-3.6.9/dcmjpeg/libijg8/jdmerge.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdmerge.c 2025-01-16 17:00:27.132342426 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jdmerge.c 2025-01-16 17:07:18.852173973 +0100 +@@ -148,7 +148,7 @@ + JDIMENSION out_rows_avail) + /* 2:1 vertical sampling case: may need a spare row. */ + { +- (void) in_row_groups_avail; ++ //(void) in_row_groups_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPROW work_ptrs[2]; + JDIMENSION num_rows; /* number of rows returned to caller */ +@@ -198,8 +198,8 @@ + JDIMENSION out_rows_avail) + /* 1:1 vertical sampling case: much easier, never need a spare row. */ + { +- (void) in_row_groups_avail; +- (void) out_rows_avail; ++ //(void) in_row_groups_avail; ++ //(void) out_rows_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Just do the upsampling. */ +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdpostct.c dcmtk-3.6.9/dcmjpeg/libijg8/jdpostct.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdpostct.c 2025-01-16 17:00:27.132342426 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jdpostct.c 2025-01-16 17:07:22.733144046 +0100 +@@ -161,8 +161,8 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void) output_buf; +- (void) out_rows_avail; ++ //(void) output_buf; ++ //(void) out_rows_avail; + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION old_next_row, num_rows; + +@@ -207,9 +207,9 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void) input_buf; +- (void) in_row_group_ctr; +- (void) in_row_groups_avail; ++ //(void) input_buf; ++ //(void) in_row_group_ctr; ++ //(void) in_row_groups_avail; + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdpred.c dcmtk-3.6.9/dcmjpeg/libijg8/jdpred.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdpred.c 2025-01-16 17:00:27.132342426 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jdpred.c 2025-01-16 17:07:28.628098584 +0100 +@@ -101,8 +101,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_1D(INITIAL_PREDICTOR2); + } + +@@ -111,8 +111,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR2); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -123,8 +123,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR3); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -135,8 +135,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + UNDIFFERENCE_2D(PREDICTOR4); + JPEG_UNUSED(Rc); + JPEG_UNUSED(Rb); +@@ -147,8 +147,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR5); + JPEG_UNUSED(Rc); +@@ -160,8 +160,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR6); + JPEG_UNUSED(Rc); +@@ -173,8 +173,8 @@ + const JDIFFROW diff_buf, const JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)cinfo; +- (void)comp_index; ++ //(void)cinfo; ++ //(void)comp_index; + SHIFT_TEMPS + UNDIFFERENCE_2D(PREDICTOR7); + JPEG_UNUSED(Rc); +@@ -194,7 +194,7 @@ + const JDIFFROW diff_buf, JDIFFROW prev_row, + JDIFFROW undiff_buf, JDIMENSION width) + { +- (void)prev_row; ++ //(void)prev_row; + j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec; + + UNDIFFERENCE_1D(INITIAL_PREDICTORx); +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdsample.c dcmtk-3.6.9/dcmjpeg/libijg8/jdsample.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdsample.c 2025-01-16 17:00:27.132342426 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jdsample.c 2025-01-16 17:07:33.259062870 +0100 +@@ -92,7 +92,7 @@ + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) + { +- (void)in_row_groups_avail; ++ //(void)in_row_groups_avail; + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int ci; + jpeg_component_info * compptr; +@@ -158,8 +158,8 @@ + fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)cinfo; +- (void)compptr; ++ //(void)cinfo; ++ //(void)compptr; + *output_data_ptr = input_data; + } + +@@ -173,9 +173,9 @@ + noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)cinfo; +- (void)compptr; +- (void)input_data; ++ //(void)cinfo; ++ //(void)compptr; ++ //(void)input_data; + *output_data_ptr = NULL; /* safety check */ + } + +@@ -239,7 +239,7 @@ + h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)compptr; ++ //(void)compptr; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; +@@ -268,7 +268,7 @@ + h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) + { +- (void)compptr; ++ //(void)compptr; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdscale.c dcmtk-3.6.9/dcmjpeg/libijg8/jdscale.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jdscale.c 2025-01-16 17:00:27.131342434 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jdscale.c 2025-01-16 17:07:35.613044716 +0100 +@@ -67,7 +67,7 @@ + const JDIFFROW diff_buf, JSAMPROW output_buf, + JDIMENSION width) + { +- (void)cinfo; ++ //(void)cinfo; + unsigned int xindex; + + for (xindex = 0; xindex < width; xindex++) +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jquant1.c dcmtk-3.6.9/dcmjpeg/libijg8/jquant1.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jquant1.c 2025-01-16 17:00:27.131342434 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jquant1.c 2025-01-16 17:05:37.787952958 +0100 +@@ -251,8 +251,8 @@ + * (Forcing the upper and lower values to the limits ensures that + * dithering can't produce a color outside the selected gamut.) + */ +- (void) cinfo; +- (void) ci; ++ //(void) cinfo; ++ //(void) ci; + return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj); + } + +@@ -262,8 +262,8 @@ + /* Return largest input value that should map to j'th output value */ + /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ + { +- (void) cinfo; +- (void) ci; ++ //(void) cinfo; ++ //(void) ci; + /* Breakpoints are halfway between values returned by output_value */ + return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); + } +@@ -744,7 +744,7 @@ + METHODDEF(void) + start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) + { +- (void) is_pre_scan; ++ //(void) is_pre_scan; + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; +@@ -802,7 +802,7 @@ + METHODDEF(void) + finish_pass_1_quant (j_decompress_ptr cinfo) + { +- (void) cinfo; ++ //(void) cinfo; + /* no work in 1-pass case */ + } + +diff -urEb dcmtk-3.6.9.orig/dcmjpeg/libijg8/jquant2.c dcmtk-3.6.9/dcmjpeg/libijg8/jquant2.c +--- dcmtk-3.6.9.orig/dcmjpeg/libijg8/jquant2.c 2025-01-16 17:00:27.131342434 +0100 ++++ dcmtk-3.6.9/dcmjpeg/libijg8/jquant2.c 2025-01-16 17:05:05.462201988 +0100 +@@ -224,7 +224,7 @@ + prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) + { +- (void) output_buf; ++ //(void) output_buf; + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register JSAMPROW ptr; + register histptr histp; +@@ -1156,7 +1156,7 @@ + METHODDEF(void) + finish_pass2 (j_decompress_ptr cinfo) + { +- (void) cinfo; ++ //(void) cinfo; + /* no work */ + } +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OrthancFramework/Resources/Patches/dcmtk-3.6.9.patch Thu Jan 16 17:11:27 2025 +0100 @@ -0,0 +1,137 @@ +diff -urEb dcmtk-3.6.9.orig/CMake/GenerateDCMTKConfigure.cmake dcmtk-3.6.9/CMake/GenerateDCMTKConfigure.cmake +--- dcmtk-3.6.9.orig/CMake/GenerateDCMTKConfigure.cmake 2025-01-16 16:47:32.943218949 +0100 ++++ dcmtk-3.6.9/CMake/GenerateDCMTKConfigure.cmake 2025-01-16 16:48:30.443789647 +0100 +@@ -227,12 +227,15 @@ + + # Check the sizes of various types + include (CheckTypeSize) ++if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") ++ # This doesn't work for wasm, Orthanc defines the macros manually + CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE) + CHECK_TYPE_SIZE("float" SIZEOF_FLOAT) + CHECK_TYPE_SIZE("int" SIZEOF_INT) + CHECK_TYPE_SIZE("long" SIZEOF_LONG) + CHECK_TYPE_SIZE("short" SIZEOF_SHORT) + CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P) ++endif() + + # Check for include files, libraries, and functions + include("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryCompile.cmake") +diff -urEb dcmtk-3.6.9.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h dcmtk-3.6.9/dcmdata/include/dcmtk/dcmdata/dcdict.h +--- dcmtk-3.6.9.orig/dcmdata/include/dcmtk/dcmdata/dcdict.h 2025-01-16 16:47:32.933219024 +0100 ++++ dcmtk-3.6.9/dcmdata/include/dcmtk/dcmdata/dcdict.h 2025-01-16 16:48:58.866576804 +0100 +@@ -163,6 +163,12 @@ + /// returns an iterator to the end of the repeating groups data dictionary + DcmDictEntryListIterator repeatingEnd() { return repDict.end(); } + ++ // Function by the Orthanc project to load a dictionary from a ++ // memory buffer, which is necessary in sandboxed ++ // environments. This is an adapted version of ++ // DcmDataDictionary::loadDictionary(). ++ OFBool loadFromMemory(const std::string& content, OFBool errorIfAbsent = OFTrue); ++ + private: + + /** private undefined assignment operator +diff -urEb dcmtk-3.6.9.orig/dcmdata/libsrc/dcdict.cc dcmtk-3.6.9/dcmdata/libsrc/dcdict.cc +--- dcmtk-3.6.9.orig/dcmdata/libsrc/dcdict.cc 2025-01-16 16:47:32.937218994 +0100 ++++ dcmtk-3.6.9/dcmdata/libsrc/dcdict.cc 2025-01-16 16:49:17.749435189 +0100 +@@ -904,3 +904,5 @@ + wrlock().clear(); + wrunlock(); + } ++ ++#include "dcdict_orthanc.cc" +diff -urEb dcmtk-3.6.9.orig/dcmdata/libsrc/dcpxitem.cc dcmtk-3.6.9/dcmdata/libsrc/dcpxitem.cc +--- dcmtk-3.6.9.orig/dcmdata/libsrc/dcpxitem.cc 2025-01-16 16:47:32.934219016 +0100 ++++ dcmtk-3.6.9/dcmdata/libsrc/dcpxitem.cc 2025-01-16 16:49:36.124297217 +0100 +@@ -31,6 +31,8 @@ + #include "dcmtk/dcmdata/dcostrma.h" /* for class DcmOutputStream */ + #include "dcmtk/dcmdata/dcwcache.h" /* for class DcmWriteCache */ + ++#undef max ++#include "dcmtk/ofstd/oflimits.h" + + // ******************************** + +diff -urEb dcmtk-3.6.9.orig/dcmnet/libsrc/scu.cc dcmtk-3.6.9/dcmnet/libsrc/scu.cc +--- dcmtk-3.6.9.orig/dcmnet/libsrc/scu.cc 2025-01-16 16:47:32.962218807 +0100 ++++ dcmtk-3.6.9/dcmnet/libsrc/scu.cc 2025-01-16 16:50:06.019072435 +0100 +@@ -19,6 +19,11 @@ + * + */ + ++#if defined(_WIN32) ++# define __STDC_LIMIT_MACROS // Get access to UINT16_MAX ++# include <stdint.h> ++#endif ++ + #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + + #include "dcmtk/dcmdata/dcostrmf.h" /* for class DcmOutputFileStream */ +diff -urEb dcmtk-3.6.9.orig/oflog/include/dcmtk/oflog/thread/syncpub.h dcmtk-3.6.9/oflog/include/dcmtk/oflog/thread/syncpub.h +--- dcmtk-3.6.9.orig/oflog/include/dcmtk/oflog/thread/syncpub.h 2025-01-16 16:47:32.914219165 +0100 ++++ dcmtk-3.6.9/oflog/include/dcmtk/oflog/thread/syncpub.h 2025-01-16 16:50:41.571804630 +0100 +@@ -63,7 +63,7 @@ + + DCMTK_LOG4CPLUS_INLINE_EXPORT + Mutex::Mutex (Mutex::Type t) +- : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t) + 0)) ++ : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t))) + { } + + +@@ -106,7 +106,7 @@ + DCMTK_LOG4CPLUS_INLINE_EXPORT + Semaphore::Semaphore (unsigned DCMTK_LOG4CPLUS_THREADED (max), + unsigned DCMTK_LOG4CPLUS_THREADED (initial)) +- : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial) + 0)) ++ : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial))) + { } + + +@@ -190,7 +190,7 @@ + + DCMTK_LOG4CPLUS_INLINE_EXPORT + ManualResetEvent::ManualResetEvent (bool DCMTK_LOG4CPLUS_THREADED (sig)) +- : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig) + 0)) ++ : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig))) + { } + + +@@ -252,7 +252,7 @@ + + DCMTK_LOG4CPLUS_INLINE_EXPORT + SharedMutex::SharedMutex () +- : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex + 0)) ++ : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex)) + { } + + +diff -urEb dcmtk-3.6.9.orig/oflog/libsrc/oflog.cc dcmtk-3.6.9/oflog/libsrc/oflog.cc +--- dcmtk-3.6.9.orig/oflog/libsrc/oflog.cc 2025-01-16 16:47:32.915219158 +0100 ++++ dcmtk-3.6.9/oflog/libsrc/oflog.cc 2025-01-16 16:50:59.297670927 +0100 +@@ -19,6 +19,11 @@ + * + */ + ++ ++#if defined(_WIN32) ++# include <winsock2.h> ++#endif ++ + #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + #include "dcmtk/oflog/oflog.h" + +diff -urEb dcmtk-3.6.9.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.9/ofstd/include/dcmtk/ofstd/offile.h +--- dcmtk-3.6.9.orig/ofstd/include/dcmtk/ofstd/offile.h 2025-01-16 16:47:32.961218815 +0100 ++++ dcmtk-3.6.9/ofstd/include/dcmtk/ofstd/offile.h 2025-01-16 16:51:21.873500479 +0100 +@@ -569,7 +569,7 @@ + */ + void setlinebuf() + { +-#if defined(_WIN32) || defined(__hpux) ++#if defined(_WIN32) || defined(__hpux) || defined(__LSB_VERSION__) + this->setvbuf(NULL, _IOLBF, 0); + #else + :: setlinebuf(file_);