From 9362d82351de459a26b59797bd3f44fb506ebe28 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 20 Feb 2012 10:59:37 +0000 Subject: [PATCH] Fix unit test French locate checks for glibc >= 2.8. Until 2.7 glibc wrongly used periods instead of slashes as separators for the French date format and the test accounted for this, breaking it with recent glibc versions in which this bug was fixed. Fix this by limiting the workaround to the old glibc versions only. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/intl/intltest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/intl/intltest.cpp b/tests/intl/intltest.cpp index e1bea25e35..d821e963cf 100644 --- a/tests/intl/intltest.cpp +++ b/tests/intl/intltest.cpp @@ -152,9 +152,13 @@ void IntlTestCase::DateTimeFmtFrench() return; #ifdef __GLIBC__ - // glibc also uses dots for French locale separator for some reason (the - // standard format uses slashes) + // Versions of glibc up to 2.7 wrongly used periods for French locale + // separator. +#if __GLIBC__ > 2 || __GLIBC_MINOR__ >= 8 + static const char *FRENCH_DATE_FMT = "%d/%m/%Y"; +#else static const char *FRENCH_DATE_FMT = "%d.%m.%Y"; +#endif static const char *FRENCH_LONG_DATE_FMT = "%a %d %b %Y"; static const char *FRENCH_DATE_TIME_FMT = "%a %d %b %Y %H:%M:%S %Z"; #else -- 2.47.2