Skip to content

Commit

Permalink
Do not include <cstring> in <dcmtk/ofstd/ofdefine.h>.
Browse files Browse the repository at this point in the history
Removed #include <cstring> from the ofdefine.h header file in order to
permit its use in C code. Added explicit #include statements in files that
previously relied on implicit inclusion through ofdefine.h.
  • Loading branch information
Marco Eichelberg committed Aug 26, 2024
1 parent 1b7d671 commit 6621c27
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions dcmdata/include/dcmtk/dcmdata/dcdicent.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
#include "dcmtk/dcmdata/dctagkey.h"
#include "dcmtk/dcmdata/dcvr.h"
#include <cstring>

/// constant describing an unlimited VM
#define DcmVariableVM -1
Expand Down
3 changes: 2 additions & 1 deletion dcmdata/include/dcmtk/dcmdata/dcrleenc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2002-2022, OFFIS e.V.
* Copyright (C) 2002-2024, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
Expand All @@ -25,6 +25,7 @@
#include "dcmtk/config/osconfig.h"
#include "dcmtk/ofstd/oflist.h" /* for class OFList<> */
#include "dcmtk/dcmdata/dcdefine.h"
#include <cstring>

#define DcmRLEEncoder_BLOCKSIZE 16384

Expand Down
1 change: 1 addition & 0 deletions dcmdata/libsrc/dcvr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
#include "dcmtk/dcmdata/dcvr.h"
#include "dcmtk/dcmdata/dctypes.h"
#include <cstring>

/*
** global flags
Expand Down
1 change: 1 addition & 0 deletions dcmdata/libsrc/dcxfer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
#include "dcmtk/dcmdata/dcxfer.h"
#include "dcmtk/dcmdata/dcuid.h"
#include <cstring>

typedef struct
{
Expand Down
3 changes: 2 additions & 1 deletion dcmimgle/apps/dcod2lum.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2002-2021, OFFIS e.V.
* Copyright (C) 2002-2024, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
Expand All @@ -26,6 +26,7 @@
#include "dcmtk/ofstd/ofconsol.h"
#include "dcmtk/dcmimgle/didispfn.h"
#include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */
#include <cstring>


#define OFFIS_CONSOLE_APPLICATION "dcod2lum"
Expand Down
3 changes: 2 additions & 1 deletion dcmimgle/libsrc/diciefn.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 1998-2021, OFFIS e.V.
* Copyright (C) 1998-2024, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
Expand All @@ -24,6 +24,7 @@

#include "dcmtk/dcmimgle/diciefn.h"
#include "dcmtk/ofstd/ofstream.h"
#include <cstring>

/*----------------*
* constructors *
Expand Down
3 changes: 2 additions & 1 deletion dcmimgle/libsrc/digsdfn.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 1999-2021, OFFIS e.V.
* Copyright (C) 1999-2024, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
Expand Down Expand Up @@ -29,6 +29,7 @@
#include "dcmtk/ofstd/ofstream.h"

#include <cmath>
#include <cstring>

/*----------------------------*
* constant initializations *
Expand Down
3 changes: 2 additions & 1 deletion dcmnet/libsrc/dccfuidh.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 1994-2021, OFFIS e.V.
* Copyright (C) 1994-2024, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
Expand All @@ -25,6 +25,7 @@

#include "dcmtk/dcmdata/dcuid.h" /* for dcmFindUIDFromName() */
#include "dcmtk/dcmdata/dcxfer.h" /* for gLocalByteOrder */
#include <cstring>

#define SymbolicUID_LocalEndianExplicit "LocalEndianExplicit"
#define SymbolicUID_OppositeEndianExplicit "OppositeEndianExplicit"
Expand Down
2 changes: 0 additions & 2 deletions ofstd/include/dcmtk/ofstd/ofdefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#include "dcmtk/ofstd/ofcast.h"
#include "dcmtk/ofstd/ofexport.h"

#include <cstring>

#ifdef ofstd_EXPORTS
#define DCMTK_OFSTD_EXPORT DCMTK_DECL_EXPORT
#else
Expand Down

0 comments on commit 6621c27

Please sign in to comment.