$NetBSD: patch-ac,v 1.2 2010/12/23 15:25:16 wiz Exp $

--- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig	2002-06-24 07:50:58.000000000 +0200
+++ 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
   };