summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-20 08:30:55 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-20 08:30:55 +0000
commitb96fd63252ced3375c138ff0157190793f9f63d4 (patch)
tree63da8a804cca53ee89edc6618689e3655f400e8b
parent751cdea3592c003a6a965fa8adde8add688dd007 (diff)
downloadgcc-b96fd63252ced3375c138ff0157190793f9f63d4.tar.gz
2012-06-20 Jörg Sonnenberger <joerg@britannica.bec.de>
Jonathan Wakely <jwakely.gcc@gmail.com> PR libstdc++/53678 * config/os/bsd/netbsd/ctype_base.h: Check for _CTYPE_U. * testsuite/22_locale/ctype_base/53678.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@188819 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/config/os/bsd/netbsd/ctype_base.h6
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc28
3 files changed, 37 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index d8fc4bfbcff..ff20cb1a197 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2012-06-20 Jörg Sonnenberger <joerg@britannica.bec.de>
+ Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/53678
+ * config/os/bsd/netbsd/ctype_base.h: Check for _CTYPE_U.
+ * testsuite/22_locale/ctype_base/53678.cc: New.
+
2012-04-12 Jeffrey Yasskin <jyasskin@google.com>
PR libstdc++/52822
diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h b/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
index d75cb79aaf6..cd654d685c5 100644
--- a/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
+++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2009, 2011, 2012 Free Software Foundation, Inc.
//
// 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
@@ -31,8 +31,6 @@
// anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
// See www.netbsd.org for details of access.
-#include <sys/param.h>
-
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -47,7 +45,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// on the mask type. Because of this, we don't use an enum.
typedef unsigned char mask;
-#if __NetBSD_Version__ < 599004100
+#ifndef _CTYPE_U
static const mask upper = _U;
static const mask lower = _L;
static const mask alpha = _U | _L;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc b/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc
new file mode 100644
index 00000000000..e4a9f071b92
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc
@@ -0,0 +1,28 @@
+// Copyright (C) 2012 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-do compile }
+
+// 22.2.1 The ctype category
+
+#include <locale>
+
+// libstdc++/53678
+void test01()
+{
+ bool NetBSD __attribute__((unused)) = true;
+}