From dcaf47fd7f841f728dd0973306e0f07128726c89 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 29 Mar 2022 19:09:38 -0400 Subject: [PATCH] cppunit: Enable CPPUNIT_HAVE_SSTREAM for the non-legacy GCC. This fixes a ton of -Wdeprecateds in the unit tests. --- headers/tools/cppunit/cppunit/Portability.h | 2 +- headers/tools/cppunit/cppunit/config-auto.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/headers/tools/cppunit/cppunit/Portability.h b/headers/tools/cppunit/cppunit/Portability.h index 610098aebe..0cd88c8545 100644 --- a/headers/tools/cppunit/cppunit/Portability.h +++ b/headers/tools/cppunit/cppunit/Portability.h @@ -64,7 +64,7 @@ #if CPPUNIT_HAVE_SSTREAM # include namespace CppUnit { - class OStringStream : public ostringstream + class OStringStream : public std::ostringstream { }; } diff --git a/headers/tools/cppunit/cppunit/config-auto.h b/headers/tools/cppunit/cppunit/config-auto.h index e38066b3d3..2bc50c5c1f 100644 --- a/headers/tools/cppunit/cppunit/config-auto.h +++ b/headers/tools/cppunit/cppunit/config-auto.h @@ -34,7 +34,13 @@ #endif /* define if the compiler has stringstream */ +#ifndef CPPUNIT_HAVE_SSTREAM +#if __GNUC__ >= 4 +#define CPPUNIT_HAVE_SSTREAM 1 +#else /* #undef CPPUNIT_HAVE_SSTREAM */ +#endif +#endif /* Define if you have the header file. */ #ifndef CPPUNIT_HAVE_STRSTREAM