Commit 1bd19e1a by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/47045 (NetBSD: define changes in ctype.h)

2011-01-13  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/47045
	* config/os/bsd/netbsd/ctype_base.h: Use new macros based on version.

From-SVN: r168732
parent 3f43ac31
2011-01-13 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/47045
* config/os/bsd/netbsd/ctype_base.h: Use new macros based on version.
2011-01-11 Paolo Carlini <paolo.carlini@oracle.com>
* aclocal.m4: Regenerate.
......
......@@ -31,6 +31,8 @@
// anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
// See www.netbsd.org for details of access.
#include <sys/param.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
/// @brief Base class for ctype.
......@@ -42,6 +44,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 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;
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment