Re: Building certain ports fails with errors in system C++ libraries

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 30 Aug 2024 17:54:41 UTC
On 30 Aug 2024, at 17:48, J David <j.david.lists@gmail.com> wrote:
> 
> On a freshly-installed FreeBSD 14.1 amd64 system, I'm hitting errors
> in the system C++ standard include files.
...
> /usr/include/c++/v1/ios:260:25: error: expected ')'
>  260 |   static const fmtflags hex         = 0x0008;
>      |                         ^
> ./edit.h:158:26: note: expanded from macro 'hex'
>  158 | #define hex     (editmode==HEXM)
>      |                          ^

This is the problem: do not redefine identifiers like this, as it leads
to problems. Try renaming this macro to "my_hex", "le_hex" or anything
but "hex". :)

-Dimitry