From ff5e1bfd6bdb2f433e0d3a15273b975f4a822da0 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Wed, 26 Apr 2017 21:56:37 +0000 Subject: [PATCH] ICU-13103 drop old versions of U_IOSTREAM_SOURCE and __GNUC__ X-SVN-Rev: 40080 --- icu4c/source/common/unicode/platform.h | 25 ------------------------- icu4c/source/io/unicode/ustream.h | 7 ------- icu4c/source/io/ustream.cpp | 3 --- icu4c/source/test/intltest/tmsgfmt.cpp | 4 ++-- icu4c/source/test/iotest/iotest.cpp | 2 -- icu4c/source/test/iotest/stream.cpp | 2 -- 6 files changed, 2 insertions(+), 41 deletions(-) diff --git a/icu4c/source/common/unicode/platform.h b/icu4c/source/common/unicode/platform.h index 5cb56c52fba..4bb4ecb4122 100644 --- a/icu4c/source/common/unicode/platform.h +++ b/icu4c/source/common/unicode/platform.h @@ -330,31 +330,6 @@ # define U_HAVE_INTTYPES_H U_HAVE_STDINT_H #endif -/** - * \def U_IOSTREAM_SOURCE - * Defines what support for C++ streams is available. - * - * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available - * (the ISO/IEC C++ FDIS was published in November 1997), and then - * one should qualify streams using the std namespace in ICU header - * files. - * Starting with ICU 49, this is the only supported version. - * - * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is - * available instead (in June 1985 Stroustrup published - * "An Extensible I/O Facility for C++" at the summer USENIX conference). - * Starting with ICU 49, this version is not supported any more. - * - * If U_IOSTREAM_SOURCE is 0 (or any value less than 199711), - * then C++ streams are not available and - * support for them will be silently suppressed in ICU. - * - * @internal - */ -#ifndef U_IOSTREAM_SOURCE -#define U_IOSTREAM_SOURCE 199711 -#endif - /*===========================================================================*/ /** @{ Compiler and environment features */ /*===========================================================================*/ diff --git a/icu4c/source/io/unicode/ustream.h b/icu4c/source/io/unicode/ustream.h index df1506ebfb2..c10ce6a2de5 100644 --- a/icu4c/source/io/unicode/ustream.h +++ b/icu4c/source/io/unicode/ustream.h @@ -34,13 +34,7 @@ namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 #endif -#if U_IOSTREAM_SOURCE >= 199711 -#if (__GNUC__ == 2) #include -#else -#include -#include -#endif U_NAMESPACE_BEGIN @@ -67,4 +61,3 @@ U_NAMESPACE_END /* No operator for UChar because it can conflict with wchar_t */ #endif -#endif diff --git a/icu4c/source/io/ustream.cpp b/icu4c/source/io/ustream.cpp index a537d14383f..948521a7fef 100644 --- a/icu4c/source/io/ustream.cpp +++ b/icu4c/source/io/ustream.cpp @@ -29,8 +29,6 @@ // console IO -#if U_IOSTREAM_SOURCE >= 199711 - #define STD_NAMESPACE std:: #define STD_OSTREAM STD_NAMESPACE ostream @@ -170,4 +168,3 @@ STOP_READING: U_NAMESPACE_END #endif -#endif diff --git a/icu4c/source/test/intltest/tmsgfmt.cpp b/icu4c/source/test/intltest/tmsgfmt.cpp index 26c44cddabe..d4e6ab69521 100644 --- a/icu4c/source/test/intltest/tmsgfmt.cpp +++ b/icu4c/source/test/intltest/tmsgfmt.cpp @@ -194,7 +194,7 @@ void TestMessageFormat::testBug2() } #if 0 -#if defined(_DEBUG) && U_IOSTREAM_SOURCE >= 199711 +#if defined(_DEBUG) //---------------------------------------------------- // console I/O //---------------------------------------------------- @@ -245,7 +245,7 @@ operator<<( IntlTest& stream, } return stream; } -#endif /* defined(_DEBUG) && U_IOSTREAM_SOURCE >= 199711 */ +#endif /* defined(_DEBUG) */ #endif void TestMessageFormat::PatternTest() diff --git a/icu4c/source/test/iotest/iotest.cpp b/icu4c/source/test/iotest/iotest.cpp index f8dc96d261b..6bc549ad4da 100644 --- a/icu4c/source/test/iotest/iotest.cpp +++ b/icu4c/source/test/iotest/iotest.cpp @@ -698,9 +698,7 @@ static void addAllTests(TestNode** root) { addTest(root, &DataDrivenPrintfPrecision, "datadriv/DataDrivenPrintfPrecision"); addTest(root, &DataDrivenScanf, "datadriv/DataDrivenScanf"); #endif -#if U_IOSTREAM_SOURCE >= 199711 addStreamTests(root); -#endif } /* returns the path to icu/source/data/out */ diff --git a/icu4c/source/test/iotest/stream.cpp b/icu4c/source/test/iotest/stream.cpp index 424d4e33af5..0ffc6239063 100644 --- a/icu4c/source/test/iotest/stream.cpp +++ b/icu4c/source/test/iotest/stream.cpp @@ -23,7 +23,6 @@ #include "cmemory.h" #include "iotest.h" -#if U_IOSTREAM_SOURCE >= 199711 #if defined(__GNUC__) && __GNUC__ >= 4 #define USE_SSTREAM 1 #include @@ -322,4 +321,3 @@ U_CFUNC void addStreamTests(TestNode** root) { addTest(root, &TestStream, "stream/TestStream"); addTest(root, &TestStreamEOF, "stream/TestStreamEOF"); } -#endif