mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-04 15:41:21 +08:00
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
This commit is contained in:
parent
3f43ac31cc
commit
1bd19e1a26
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user