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

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 14 Aug 2021 03:45:27 +0000

--- Comment #3 from Warner Losh <imp_at_FreeBSD.org> ---
It's not illegal to call POSIX code from C++. They are just functions after

What's undefined is to ask for a strict POSIX namespace using the feature test
macros. Without them, everything will be visible. Since the C++ headers use
POSIX features in unspecified ways, I don't think you can come up with a set of
feature test macros that's guaranteed to work in that environment. Since these
feature test macros are for the user to request things outside of the POSIX
standard defines not be defined, the simplest workaround is to not define them.

I've not kept up with the Austin Group's standardization process to know if
they are including C++ or not with their next refresh of the standard. We've
not had anything other than technical corrections since 2008.

You are receiving this mail because:
You are the assignee for the bug.
Received on Sat Aug 14 2021 - 03:45:27 UTC

Original text of this message