From patchwork Tue Jun 7 08:52:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 99100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5AC92B6FA9 for ; Tue, 7 Jun 2011 18:52:11 +1000 (EST) Received: (qmail 14734 invoked by alias); 7 Jun 2011 08:52:09 -0000 Received: (qmail 14718 invoked by uid 22791); 7 Jun 2011 08:52:08 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp204.alice.it (HELO smtp204.alice.it) (82.57.200.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 08:51:47 +0000 Received: from [192.168.1.4] (79.52.211.22) by smtp204.alice.it (8.5.124.08) id 4DE62ADD007DA08E; Tue, 7 Jun 2011 10:51:42 +0200 Message-ID: <4DEDE6BC.5090103@oracle.com> Date: Tue, 07 Jun 2011 10:52:12 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] libstdc++/49293 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, sanity checked x86_64-linux, committed to mainline. Paolo. /////////////////// 2011-06-07 Paolo Carlini PR libstdc++/49293 * testsuite/22_locale/time_get/get_weekday/char/38081-1.cc: Tweak for glibc 2.14. * testsuite/22_locale/time_get/get_weekday/char/38081-2.cc: Likewise. Index: testsuite/22_locale/time_get/get_weekday/char/38081-1.cc =================================================================== --- testsuite/22_locale/time_get/get_weekday/char/38081-1.cc (revision 174735) +++ testsuite/22_locale/time_get/get_weekday/char/38081-1.cc (working copy) @@ -1,6 +1,6 @@ // { dg-require-namedlocale "ru_RU.ISO-8859-5" } -// Copyright (C) 2010 Free Software Foundation +// Copyright (C) 2010, 2011 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -49,7 +49,11 @@ // get_weekday(iter_type, iter_type, ios_base&, // ios_base::iostate&, tm*) const +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14) + iss.str("\xbf\xdd\x2e"); +#else iss.str("\xbf\xdd\xd4"); +#endif iterator_type is_it01(iss); tm time01; memset(&time01, -1, sizeof(tm)); @@ -67,7 +71,11 @@ VERIFY( time02.tm_wday == 1 ); VERIFY( errorstate == ios_base::eofbit ); +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14) + iss.str("\xbf\xdd\x2e\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda"); +#else iss.str("\xbf\xdd\xd4\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda"); +#endif iterator_type is_it03(iss); tm time03; memset(&time03, -1, sizeof(tm)); Index: testsuite/22_locale/time_get/get_weekday/char/38081-2.cc =================================================================== --- testsuite/22_locale/time_get/get_weekday/char/38081-2.cc (revision 174735) +++ testsuite/22_locale/time_get/get_weekday/char/38081-2.cc (working copy) @@ -2,7 +2,7 @@ // 2010-01-05 Paolo Carlini -// Copyright (C) 2010 Free Software Foundation +// Copyright (C) 2010, 2011 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -50,6 +50,15 @@ // get_weekday(iter_type, iter_type, ios_base&, // ios_base::iostate&, tm*) const +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14) + const char* awdays[7] = { "\u0412\u0441\u002E", + "\u041F\u043D\u002E", + "\u0412\u0442\u002E", + "\u0421\u0440\u002E", + "\u0427\u0442\u002E", + "\u041F\u0442\u002E", + "\u0421\u0431\u002E" }; +#else const char* awdays[7] = { "\u0412\u0441\u043A", "\u041F\u043D\u0434", "\u0412\u0442\u0440", @@ -57,6 +66,7 @@ "\u0427\u0442\u0432", "\u041F\u0442\u043D", "\u0421\u0431\u0442" }; +#endif for (int i = 0; i < 7; ++i) {