From 205842898a551f427d7f92d7fa7bffd03a96a499 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 21 Sep 2017 00:25:49 +0000 Subject: [PATCH] ICU-13093 std::isinf and std::isnan fix X-SVN-Rev: 40438 --- icu4c/source/test/intltest/numfmtst.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index ec251f1b483..f62bc36a158 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -41,6 +41,28 @@ #include "datadrivennumberformattestsuite.h" #include "unicode/msgfmt.h" +#if U_PLATFORM == U_PF_AIX +// These should not be macros. If they are, +// replace them with std::isnan and std::isinf +#if defined(isnan) +#undef isnan +namespace std { + bool isnan(double x) { + return _isnan(x); + } +} +#endif +#if defined(isinf) +#undef isinf +namespace std { + bool isinf(double x) { + return _isinf(x); + } +} +#endif +#endif + + class NumberFormatTestDataDriven : public DataDrivenNumberFormatTestSuite { protected: UBool isFormatPass( -- 2.40.0