diff --git a/CMake/dcmtkAfterModules.cmake b/CMake/dcmtkAfterModules.cmake index 2e6cd29d6..100001873 100644 --- a/CMake/dcmtkAfterModules.cmake +++ b/CMake/dcmtkAfterModules.cmake @@ -11,7 +11,7 @@ if(BUILD_SINGLE_SHARED_LIBRARY) # Build a single "everything-library". # The library dependencies are collected by DCMTK_TARGET_LINK_LIBRARIES(). add_library(dcmtk SHARED ${LIBS}) - target_link_libraries(dcmtk ${DCMTK_LIBRARY_DEPENDENCIES}) + target_link_libraries(dcmtk PRIVATE ${DCMTK_LIBRARY_DEPENDENCIES}) set_target_properties(dcmtk PROPERTIES ${DCMTK_LIBRARY_PROPERTIES}) # Export target for build tree diff --git a/ofstd/include/dcmtk/ofstd/ofcond.h b/ofstd/include/dcmtk/ofstd/ofcond.h index 0f9e39a4c..48b2465b0 100644 --- a/ofstd/include/dcmtk/ofstd/ofcond.h +++ b/ofstd/include/dcmtk/ofstd/ofcond.h @@ -193,7 +193,7 @@ class DCMTK_OFSTD_EXPORT OFCondition theCondition.theStatus = aStatus; /* Be nice when someone dares to pass in NULL */ if (aText != NULL) { - theCondition.theText = strdup(aText); + theCondition.theText = _strdup(aText); ownsText = OFTrue; } else { theCondition.theText = ""; @@ -220,7 +220,7 @@ class DCMTK_OFSTD_EXPORT OFCondition // Do we need our own copy of the text? if (ownsText) { - theCondition.theText = strdup(theCondition.theText); + theCondition.theText = _strdup(theCondition.theText); } } @@ -256,7 +256,7 @@ class DCMTK_OFSTD_EXPORT OFCondition ownsText = arg.ownsText; if (ownsText) { - theCondition.theText = strdup(arg.theCondition.theText); + theCondition.theText = _strdup(arg.theCondition.theText); } } return *this; diff --git a/ofstd/libsrc/offile.cc b/ofstd/libsrc/offile.cc index 2eedbb53a..eb2ab49bb 100644 --- a/ofstd/libsrc/offile.cc +++ b/ofstd/libsrc/offile.cc @@ -99,7 +99,7 @@ OFFilename::OFFilename(const OFFilename &arg) #endif { if (arg.filename_ != NULL) - filename_ = strdup(arg.filename_); + filename_ = _strdup(arg.filename_); #if (defined(WIDE_CHAR_FILE_IO_FUNCTIONS) || defined(WIDE_CHAR_MAIN_FUNCTION)) && defined(_WIN32) if (arg.wfilename_ != NULL) wfilename_ = _wcsdup(arg.wfilename_); @@ -118,7 +118,7 @@ OFFilename &OFFilename::operator=(const OFFilename &arg) if (&arg != this) { free(filename_); - filename_ = (arg.filename_ != NULL) ? strdup(arg.filename_) : NULL; + filename_ = (arg.filename_ != NULL) ? _strdup(arg.filename_) : NULL; #if (defined(WIDE_CHAR_FILE_IO_FUNCTIONS) || defined(WIDE_CHAR_MAIN_FUNCTION)) && defined(_WIN32) free(wfilename_); wfilename_ = (arg.wfilename_ != NULL) ? _wcsdup(arg.wfilename_) : NULL; @@ -165,7 +165,7 @@ void OFFilename::set(const char *filename, clear(); if (filename != NULL) { - filename_ = strdup(filename); + filename_ = _strdup(filename); #if (defined(WIDE_CHAR_FILE_IO_FUNCTIONS) || defined(WIDE_CHAR_MAIN_FUNCTION)) && defined(_WIN32) #ifdef HAVE_WINDOWS_H if (convert) @@ -215,7 +215,7 @@ void OFFilename::set(const wchar_t *filename, /* convert wide character encoding to UTF-8 representation */ OFCharacterEncoding::convertFromWideCharString(filename, wcslen(filename), tmpString, OFCharacterEncoding::CPC_UTF8); - filename_ = strdup(tmpString.c_str()); + filename_ = _strdup(tmpString.c_str()); } #endif /* avoid compiler warning on unused variable */