Fix build on NetBSD/current by copying gcc34's patch-ac.

This commit is contained in:
joerg 2011-09-21 13:38:48 +00:00
parent 846f6b64f8
commit 7278c78dfb
2 changed files with 41 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.25 2009/02/28 18:37:22 joerg Exp $
$NetBSD: distinfo,v 1.26 2011/09/21 13:38:48 joerg Exp $
SHA1 (gcc-3.3.6.tar.bz2) = 2cc43978bb09af6c2ccfdf74797d10d7cc2596fb
RMD160 (gcc-3.3.6.tar.bz2) = b32c7a08c690857f0ac52dda3deb47cf5775d967
@ -22,3 +22,4 @@ SHA1 (patch-aq) = 1ee8d951e464a154c4f2a3f48d4c2101c2f3d79d
SHA1 (patch-ar) = 1ed0338bde1e863ddcfbc0bdfb77aeafdbef7220
SHA1 (patch-as) = 35e1649aed1744be5cdd7caa0b246e74dd9df0aa
SHA1 (patch-at) = a8a310b85e661bbf2cb832027b84b72c1db27a0c
SHA1 (patch-au) = 801818472ae456e4e21abd2010b24d3814b77314

View file

@ -0,0 +1,39 @@
$NetBSD: patch-au,v 1.1 2011/09/21 13:38:48 joerg Exp $
--- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig 2002-06-24 05:48:58.000000000 +0000
+++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
@@ -36,6 +36,8 @@
// anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
// See www.netbsd.org for details of access.
+#include <sys/param.h>
+
struct ctype_base
{
// Non-standard typedefs.
@@ -44,6 +46,7 @@
// NB: Offsets into ctype<char>::_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;
@@ -55,4 +58,17 @@
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
};