Fix build on NetBSD-5.99.41 (_? -> _CTYPE_?) while hopefully not breaking

older releases.
This commit is contained in:
wiz 2010-12-20 00:04:50 +00:00
parent 8c7216dfa9
commit 2d6b99bac3
2 changed files with 52 additions and 1 deletions

View file

@ -1,10 +1,11 @@
$NetBSD: distinfo,v 1.20 2010/05/04 20:46:31 tez Exp $ $NetBSD: distinfo,v 1.21 2010/12/20 00:04:50 wiz Exp $
SHA1 (gcc-3.4.6.tar.bz2) = 97b290fdc572c8e490b3b39f243e69bacad23c2b SHA1 (gcc-3.4.6.tar.bz2) = 97b290fdc572c8e490b3b39f243e69bacad23c2b
RMD160 (gcc-3.4.6.tar.bz2) = b15003368cedc7964f6ceaee0c39ddc43a46c442 RMD160 (gcc-3.4.6.tar.bz2) = b15003368cedc7964f6ceaee0c39ddc43a46c442
Size (gcc-3.4.6.tar.bz2) = 28193401 bytes Size (gcc-3.4.6.tar.bz2) = 28193401 bytes
SHA1 (patch-aa) = 40ba26c4af81ecc0effce3b7ac3c74bdfe4b56a6 SHA1 (patch-aa) = 40ba26c4af81ecc0effce3b7ac3c74bdfe4b56a6
SHA1 (patch-ab) = 50345471e99264104e136acd7c09da0a5275cb62 SHA1 (patch-ab) = 50345471e99264104e136acd7c09da0a5275cb62
SHA1 (patch-ac) = 75620fe258114faaf8020bb073e7e840b23b1ccc
SHA1 (patch-ae) = 928fa6155e614ca85b02359cf893d6c62231b192 SHA1 (patch-ae) = 928fa6155e614ca85b02359cf893d6c62231b192
SHA1 (patch-af) = cdd6b0d13c557996cb6582d7fa5dc651d37ee0ee SHA1 (patch-af) = cdd6b0d13c557996cb6582d7fa5dc651d37ee0ee
SHA1 (patch-ag) = beee5294d387faafa640ab048823499da629e715 SHA1 (patch-ag) = beee5294d387faafa640ab048823499da629e715

View file

@ -0,0 +1,50 @@
$NetBSD: patch-ac,v 1.1 2010/12/20 00:04:50 wiz Exp $
--- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig 2002-06-24 05:50:58.000000000 +0000
+++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
@@ -36,6 +36,18 @@
// anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
// See www.netbsd.org for details of access.
+#include <sys/param.h>
+#if __NetBSD_Version__ < 599004100
+#define _U _CTYPE_U
+#define _L _CTYPE_L
+#define _N _CTYPE_N
+#define _X _CTYPE_X
+#define _S _CTYPE_S
+#define _P _CTYPE_P
+#define _B _CTYPE_B
+#define _C _CTYPE_C
+#endif
+
struct ctype_base
{
// Non-standard typedefs.
@@ -44,15 +56,15 @@
// 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;
- static const mask upper = _U;
- static const mask lower = _L;
- static const mask alpha = _U | _L;
- static const mask digit = _N;
- static const mask xdigit = _N | _X;
- static const mask space = _S;
- static const mask print = _P | _U | _L | _N | _B;
- static const mask graph = _P | _U | _L | _N;
- static const mask cntrl = _C;
- static const mask punct = _P;
- static const mask alnum = _U | _L | _N;
+ 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;
};