Skip to content

Commit 0040dc7

Browse files
committed
COMP: Protect duplicate definition warnings
DCMTK also defines HAVE_SSTREAM
1 parent daf4538 commit 0040dc7

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

tclap/include/tclap/MultiArgOld.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
#ifdef HAVE_CONFIG_H
3333
#include <config.h>
3434
#else
35-
#define HAVE_SSTREAM
35+
# ifndef HAVE_SSTREAM //This may have been defined elsewhere
36+
# define HAVE_SSTREAM 1
37+
# endif
3638
#endif
3739

3840
#if defined(HAVE_SSTREAM)

tclap/include/tclap/ValueArgOld.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
#ifdef HAVE_CONFIG_H
3333
#include <config.h>
3434
#else
35-
#define HAVE_SSTREAM
35+
# ifndef HAVE_SSTREAM //This may have been defined elsewhere
36+
# define HAVE_SSTREAM 1
37+
# endif
3638
#endif
3739

3840
#if defined(HAVE_SSTREAM)

tclap/include/tclap/ValuesConstraint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# include <config.h>
3030
#else
3131
# ifndef HAVE_SSTREAM //This may have been defined elsewhere
32-
# define HAVE_SSTREAM
32+
# define HAVE_SSTREAM 1
3333
# endif
3434
#endif
3535

tclap/include/tclap/sstream.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
#if !defined(HAVE_STRSTREAM)
2929
// Assume sstream is available if strstream is not specified
3030
// (https://sourceforge.net/p/tclap/bugs/23/)
31-
#define HAVE_SSTREAM
31+
# ifndef HAVE_SSTREAM //This may have been defined elsewhere
32+
# define HAVE_SSTREAM 1
33+
# endif
3234
#endif
3335

3436
#if defined(HAVE_SSTREAM)

0 commit comments

Comments
 (0)