1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-21 23:18:00 -08:00

Adapt base libstdc++ to the new ctype.h defines

ctype_base.h is correctly installed by make includes so the transition should
be automatic.  If you hit a failure with this header, make sure ctype.h and
ctype_base.h are in sync.

ok miod@ tb@
This commit is contained in:
jca 2024-02-04 13:03:26 +00:00
parent 0967fc9724
commit 07a83dd91d
2 changed files with 22 additions and 22 deletions

View File

@ -46,17 +46,17 @@ _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 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 = char(_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 = char(_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;
};
_GLIBCXX_END_NAMESPACE

View File

@ -41,15 +41,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 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;
};