From 70f2b2c7da69c20f4e45843e70291b6803a2af72 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 4 Apr 2018 04:39:38 +0000 Subject: [PATCH] Fix undefined macro issue in locale tests git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329148 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../locale.moneypunct.byname/decimal_point.pass.cpp | 5 ++++- .../locale.moneypunct.byname/thousands_sep.pass.cpp | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp index 84fc8f802..e1c616c55 100644 --- a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp +++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp @@ -110,7 +110,10 @@ int main() assert(f.decimal_point() == L','); } // GLIBC 2.23 uses '.' as the decimal point while other C libraries use ',' -// GLIBC 2.27 corrects this. +// GLIBC 2.27 corrects this +#ifndef TEST_GLIBC_PREREQ +#define TEST_GLIBC_PREREQ(x, y) 0 +#endif #if !defined(TEST_HAS_GLIBC) || TEST_GLIBC_PREREQ(2, 27) const char sep = ','; const wchar_t wsep = L','; diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp index 4a672a7b6..880d800c5 100644 --- a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp +++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp @@ -118,6 +118,9 @@ int main() // and U002E as mon_decimal_point. // TODO: Fix thousands_sep for 'char'. // related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006 +#ifndef TEST_GLIBC_PREREQ +#define TEST_GLIBC_PREREQ(x, y) 0 +#endif #ifndef TEST_HAS_GLIBC const char sep = ' '; const wchar_t wsep = L' ';