]> granicus.if.org Git - icu/commitdiff
ICU-13093 Disabling number formatting code on AIX and z/OS due to C++11 compatibility...
authorShane Carr <shane@unicode.org>
Thu, 5 Oct 2017 00:47:38 +0000 (00:47 +0000)
committerShane Carr <shane@unicode.org>
Thu, 5 Oct 2017 00:47:38 +0000 (00:47 +0000)
X-SVN-Rev: 40560

41 files changed:
icu4c/source/common/unicode/platform.h
icu4c/source/i18n/number_affixutils.cpp
icu4c/source/i18n/number_affixutils.h
icu4c/source/i18n/number_compact.cpp
icu4c/source/i18n/number_compact.h
icu4c/source/i18n/number_decimalquantity.cpp
icu4c/source/i18n/number_decimalquantity.h
icu4c/source/i18n/number_decimfmtprops.cpp
icu4c/source/i18n/number_decimfmtprops.h
icu4c/source/i18n/number_fluent.cpp
icu4c/source/i18n/number_formatimpl.cpp
icu4c/source/i18n/number_formatimpl.h
icu4c/source/i18n/number_grouping.cpp
icu4c/source/i18n/number_integerwidth.cpp
icu4c/source/i18n/number_longnames.cpp
icu4c/source/i18n/number_longnames.h
icu4c/source/i18n/number_modifiers.cpp
icu4c/source/i18n/number_modifiers.h
icu4c/source/i18n/number_notation.cpp
icu4c/source/i18n/number_padding.cpp
icu4c/source/i18n/number_patternmodifier.cpp
icu4c/source/i18n/number_patternmodifier.h
icu4c/source/i18n/number_patternstring.cpp
icu4c/source/i18n/number_patternstring.h
icu4c/source/i18n/number_rounding.cpp
icu4c/source/i18n/number_roundingutils.h
icu4c/source/i18n/number_scientific.cpp
icu4c/source/i18n/number_scientific.h
icu4c/source/i18n/number_stringbuilder.cpp
icu4c/source/i18n/number_stringbuilder.h
icu4c/source/i18n/number_types.h
icu4c/source/i18n/number_utils.h
icu4c/source/test/intltest/itformat.cpp
icu4c/source/test/intltest/numbertest.h
icu4c/source/test/intltest/numbertest_affixutils.cpp
icu4c/source/test/intltest/numbertest_api.cpp
icu4c/source/test/intltest/numbertest_decimalquantity.cpp
icu4c/source/test/intltest/numbertest_modifiers.cpp
icu4c/source/test/intltest/numbertest_patternmodifier.cpp
icu4c/source/test/intltest/numbertest_patternstring.cpp
icu4c/source/test/intltest/numbertest_stringbuilder.cpp

index e1a7bdbc745e7ef50b45c63e17806837a1da3c16..44e205ec8ffe29c7456097b212494925c425d9ce 100644 (file)
 #   define U_PLATFORM U_PF_UNKNOWN
 #endif
 
+/**
+ * \def UPRV_INCOMPLETE_CPP11_SUPPORT
+ * This switch turns off ICU 60 NumberFormatter code.
+ * By default, this switch is enabled on AIX and z/OS,
+ * which have poor C++11 support.
+ *
+ * NOTE: This switch is intended to be temporary; see #13393.
+ *
+ * @internal
+ */
+#ifndef UPRV_INCOMPLETE_CPP11_SUPPORT
+#   define UPRV_INCOMPLETE_CPP11_SUPPORT (U_PLATFORM == U_PF_AIX || U_PLATFORM == U_PF_OS390)
+#endif
+
 /**
  * \def CYGWINMSVC
  * Defined if this is Windows with Cygwin, but using MSVC rather than gcc.
index 88096e4ca0752da3deca439ad722eca6a71f38e5..ca6531f5693771c103773be730b04239d611649c 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "number_affixutils.h"
 #include "unicode/utf16.h"
index 76187ef5a39ef327f0e46e7aa21ff5018ae1c888..459f489bcf2c36eb866d84525dcb269dd9257568 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_AFFIXUTILS_H__
 #define __NUMBER_AFFIXUTILS_H__
 
index 9a30fbc340245a1fe36d61c27f0759f6fb2f1ed8..df3b250f0d10065cb9d97207a666ae0d5e8c9e66 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "resource.h"
 #include "number_compact.h"
index 985e4e273b6dbca37aa44605503754d1c827b33e..2344abf535a96212b7265cc7e59e8e21137cc213 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_COMPACT_H__
 #define __NUMBER_COMPACT_H__
 
index 7842b7eed3e3c564e0418812480ae206dbf23ffe..185e0cb6dc50f4b3a8d47d8128dd7c3d253e6261 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "uassert.h"
 #include <cmath>
index d7837d7326e6cb9ab2e501af9dbeaa8cbee69b29..ccb832623cb7bb6f123d0ca273cfb520fd759c50 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_DECIMALQUANTITY_H__
 #define __NUMBER_DECIMALQUANTITY_H__
 
index dd8f86e66e8d5394377aa8534c648f1bcc8d7262..36aad6971e89aa67458698c4ba04a8eec27aeed9 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "number_decimfmtprops.h"
 
index 62bed6cd13060c57f18ad8883b526e8c2d21ec20..a179d0876ab5297300732f3e385393deff194f1f 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_DECIMFMTPROPS_H__
 #define __NUMBER_DECIMFMTPROPS_H__
 
index 7257df24ff62d70ffb28fff690b22cef0ea731c7..c37f684c3c0f528320ce1f22424d7b53dfbb76c8 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "uassert.h"
 #include "unicode/numberformatter.h"
index 8c04ca01106b1ec933dfcdbc077909357141c2d8..6e9d287538a45275af8383b67a6a8c180700b264 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "cstring.h"
 #include "unicode/ures.h"
index 9531b6f57e9e81cbcf91adff84e8c0278680ea3f..f92eb82c8348777e7ad2f544024c73bbdd77b173 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_FORMATIMPL_H__
 #define __NUMBER_FORMATIMPL_H__
 
index 65df97e822025a5170608538a02363935e336b8e..15eb857eacd1f36b65397351e0e831c598f09417 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "unicode/numberformatter.h"
 #include "number_patternstring.h"
index 7d95a026130782d271b1500ffe9d04c780b3ec1a..d64bfde49c55335792adae85d44c7fbb1b46f830 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "unicode/numberformatter.h"
 #include "number_types.h"
index 884b81ca5e8c9c846b93cebd770725c1ac0e099f..77385132c74d51067b32f1550b83b31adc4b54a7 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "unicode/ures.h"
 #include "ureslocs.h"
index e724ff6260796e8bef989c717b754f06804c85fd..f30fb501b8de258f4c5ef73fee4f8244d33309d6 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_LONGNAMES_H__
 #define __NUMBER_LONGNAMES_H__
 
index b01b6780b06a8295db5a6747e314b374cb285ce3..d95113a0310c7905f6e44a9a18c350e25212e338 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "umutex.h"
 #include "ucln_cmn.h"
index 7c02a3d64fd9749ae7cf11de0801e6378e454514..6a88828a44dd71bd01af4804efcbb745fe445d3d 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_MODIFIERS_H__
 #define __NUMBER_MODIFIERS_H__
 
index f7ccb783dd4cce87fd4253a677aebc0d7293af45..b681a8faa421eda8ef365f9628204562410a07d6 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "unicode/numberformatter.h"
 #include "number_types.h"
index 983949eddc334741f3e946cb2961533db30ad998..1e59018d31f57117b73cfd0b3f6ae6112f16d5fb 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "unicode/numberformatter.h"
 #include "number_types.h"
index 8e44b3f964043eab81b95400a71400a8543ed134..d8673bf6a0d947fe201dc64e10469de1345485ea 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "cstring.h"
 #include "number_patternmodifier.h"
index 06e5ade3e11e134addbf122d2f2be14e06e7ca34..267c7f78981b45616e5470d116d19fcb7b008263 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_PATTERNMODIFIER_H__
 #define __NUMBER_PATTERNMODIFIER_H__
 
index 358ce3164666e292d549991cbac47bdbdc53f78e..f25526fb2576acbe1801fc4364b97c328c71afc7 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "uassert.h"
 #include "number_patternstring.h"
index d827ba8f826c271a0a4e42a3ea6439b6eb97f436..6e1bb7f44ddc02a26718864628f16c3a56007e76 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_PATTERNSTRING_H__
 #define __NUMBER_PATTERNSTRING_H__
 
index 469e0c91fca7cb911ada701dbe69eaf918556e88..ad5d2d8d700d8ca3e8db006dbaa9cdda1455ad70 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "uassert.h"
 #include "unicode/numberformatter.h"
index 845f26cbe9fa279b09f14242fc0511889565d1b1..6868ee0b86817edefc82b7b1455b1ec2f021a1d0 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_ROUNDINGUTILS_H__
 #define __NUMBER_ROUNDINGUTILS_H__
 
index 8f25afd3721561c514fe4e0db5376358ce26eb22..c1b3dcc3fb84c8eb6b3ed867931a50452e888260 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include <cstdlib>
 #include "number_scientific.h"
index 974ab3adb614ca34637981d03bfbb530f10c6f22..f5e4d30e6a973762161bf80b4baea6befba94393 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_SCIENTIFIC_H__
 #define __NUMBER_SCIENTIFIC_H__
 
index b803af6a775dca3412990ddbcb124df09102f970..698e6b2929802ede2673632082279973fff26f32 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "number_stringbuilder.h"
 #include "unicode/utf16.h"
index a97094ad8b48ba802b119f07ea11301820c64e3b..f08dcb1d1bed6a6bf4f078905cb8909853e3eb1f 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_STRINGBUILDER_H__
 #define __NUMBER_STRINGBUILDER_H__
 
index 2b01d68b9e2f95b5b644f02e0940c0a282669009..ff863bb82f597303e63646e98d42e821f647a972 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_TYPES_H__
 #define __NUMBER_TYPES_H__
 
index 0814ec005daef389ffb538d54a17a2a100f89797..3a408d6007a2cdc9270acce9de098514954bb8e1 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #ifndef __NUMBER_UTILS_H__
 #define __NUMBER_UTILS_H__
 
index 0b3bf8a481c76d3238b3ed715df6d3c8f5bb8d5a..049e6489174cf75d618935033999ab92a858ed94 100644 (file)
 #include "dcfmtest.h"       // DecimalFormatTest
 #include "listformattertest.h"  // ListFormatterTest
 #include "regiontst.h"      // RegionTest
-#include "numbertest.h"     // All NumberFormatter tests
+
+// NumberFormatter is disabled on some platforms due to C++11 compatibility
+#if !UPRV_INCOMPLETE_CPP11_SUPPORT
+#   include "numbertest.h"     // All NumberFormatter tests
+#else
+class NumberTest : public IntlTest {
+  public:
+    void runIndexedTest(int32_t index, UBool exec, const char*& name, char*) {
+        if (index > 0) { name = ""; return; } // base case
+        name = "NumberTest";
+        if (exec) {
+            infoln(u"   NOTE: NumberTest is disabled on this platform; see ICU ticket #13393.");
+        }
+    }
+};
+#endif
 
 extern IntlTest *createCompactDecimalFormatTest();
 extern IntlTest *createGenderInfoTest();
index d22080fb499ca8d0d63180ebb79abf3c342965f9..3e600318339c3a7a468c3a3aebd862049f058575 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 #pragma once
 
 #include "number_stringbuilder.h"
index a069c0eefd66963dc6a4b8ba70361add1e2ca7cc..5fff9853e6a8793f8560a45684b054ff30cd2363 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "putilimp.h"
 #include "unicode/dcfmtsym.h"
index 9988b3e8f482e17c51387431a10b016237c3e729..b8420ed12af0c5d69a1d1bfadbc51317dab476d6 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "charstr.h"
 #include <cstdarg>
index 69a5aaa3e3d52c3aa858cfd77c3e5fb644b75b2d..aeef49bd0d793327ffd452d4d40c0adc49c78993 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "number_decimalquantity.h"
 #include "math.h"
index 3cceee2c079e31aadb50fd317c2862845468a28c..279df757f69405bf3c42c8d084f4751f9f5ffa67 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "putilimp.h"
 #include "intltest.h"
index 22d98575dddba11bb7abbd1b6d27536a76988e71..323f215fbf4507cd5a05bc25ded3e67b04daffe0 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "numbertest.h"
 #include "number_patternmodifier.h"
index ce766cddd374041f7544f212bb275a2fd5183362..aa2c2b47365f107cd479822e5eb9105683ae8780 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "numbertest.h"
 #include "number_patternstring.h"
index c9d688c76d1886837a2695748256187debe0c83a..5e51c7e53b45e5c906a8a89a1d5f9bedeb4bda78 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_FORMATTING
+#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT
 
 #include "putilimp.h"
 #include "numbertest.h"