From patchwork Thu Jan 13 00:02:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 78626 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 AF4FAB6F1E for ; Thu, 13 Jan 2011 11:03:22 +1100 (EST) Received: (qmail 14737 invoked by alias); 13 Jan 2011 00:03:12 -0000 Received: (qmail 14711 invoked by uid 22791); 13 Jan 2011 00:03:09 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Jan 2011 00:03:02 +0000 Received: by wyb40 with SMTP id 40so1152851wyb.20 for ; Wed, 12 Jan 2011 16:02:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.4.2 with SMTP id 2mr1417985wei.51.1294876977822; Wed, 12 Jan 2011 16:02:57 -0800 (PST) Received: by 10.216.160.131 with HTTP; Wed, 12 Jan 2011 16:02:57 -0800 (PST) Date: Thu, 13 Jan 2011 00:02:57 +0000 Message-ID: Subject: [v3] fix libstdc++/47045 From: Jonathan Wakely To: "libstdc++" , gcc-patches 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 2011-01-13 Jonathan Wakely PR libstdc++/47045 * config/os/bsd/netbsd/ctype_base.h: Use new macros based on version. Bootstrapped on x86_64/netbsd (with patch from PR 47147 needed to fix bootstrap on NetBSD). committed to trunk. Index: config/os/bsd/netbsd/ctype_base.h =================================================================== --- config/os/bsd/netbsd/ctype_base.h (revision 168649) +++ config/os/bsd/netbsd/ctype_base.h (working copy) @@ -31,6 +31,8 @@ // anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h // See www.netbsd.org for details of access. +#include + _GLIBCXX_BEGIN_NAMESPACE(std) /// @brief Base class for ctype. @@ -42,6 +44,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // NB: Offsets into ctype::_M_table force a particular size // on the mask type. Because of this, we don't use an enum. typedef unsigned char mask; + +#if __NetBSD_Version__ < 599004100 static const mask upper = _U; static const mask lower = _L; static const mask alpha = _U | _L; @@ -53,6 +57,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask cntrl = _C; static const mask punct = _P; static const mask alnum = _U | _L | _N; +#else + static const mask upper = _CTYPE_U; + static const mask lower = _CTYPE_L; + static const mask alpha = _CTYPE_U | _CTYPE_L; + static const mask digit = _CTYPE_N; + static const mask xdigit = _CTYPE_N | _CTYPE_X; + static const mask space = _CTYPE_S; + static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N | _CTYPE_B; + static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N; + static const mask cntrl = _CTYPE_C; + static const mask punct = _CTYPE_P; + static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_N; +#endif }; _GLIBCXX_END_NAMESPACE