[Bug 257827] Providing _POSIX_C_SOURCE causes some C++ headers to fail

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 14 Aug 2021 01:04:30 +0000

Warner Losh <imp_at_FreeBSD.org> changed:

           What    |Removed                     |Added
                 CC|                            |imp_at_FreeBSD.org

--- Comment #1 from Warner Losh <imp_at_FreeBSD.org> ---
_POSIX_C_SOURCE=200112 is only valid for 'C' code, not 'C++'.
It specifically requires a C99 compiler as well, and only makes c99
defined functions visible (and a few others that aren't relevant here).
isascii is marked as XSI in the POSIX standard and ctypes.h says that it must
define the proper feature test macros (in this case _XOPEN_SOURCE must be
defined to 700) before it is visible.

So I'm thinking this isn't a bug in two different ways: it's not C and even if
it were, the proper _XOPEN_SOURCE macro isn't defined when you've asked for
strict POSIX compliance.

You are receiving this mail because:
You are the assignee for the bug.
Received on Sat Aug 14 2021 - 01:04:30 UTC

Original text of this message