GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
libstdc++

libstdc++: Adapt ctype_base masks for OpenBSD

Fixes OpenBSD build by using correct ctype_base mask macros.

This change updates libstdc++‘s ctype_base.h configuration for OpenBSD. Recent changes in OpenBSD have redefined certain mask macros used for character classification. This patch ensures that the build uses the newly defined, prefixed macros when available, resolving compilation failures on OpenBSD.

In Details

The libstdc++-v3/config/os/bsd/openbsd/ctype_base.h header has been updated to conditionally use _CTYPE prefixed macros. This is necessary because OpenBSD has renamed its CTYPE-related macros, causing build failures when the older, non-prefixed names are referenced. This commit ensures compatibility with the new OpenBSD macro definitions.

For Context
libstdc++
The C++ standard library implementation used by GCC.
ctype_base
A base class in libstdc++ that provides locale-dependent character classification and conversion facilities, including bitmasks representing character classes.
Mask Macros
Preprocessor macros that define bitmasks used to categorize characters (e.g., alphabetic, numeric, whitespace).
Filed Under: libstdc++openbsdbuildctype