[PATCH] #undef isblank before def or decl in libstdc++ headers
Olivier Hainque
hainque@adacore.com
Sat Dec 11 10:55:31 GMT 2021
(Thanks for your feedback Jonathan)
> On 10 Dec 2021, at 19:24, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> I'm curious why _GLIBCXX_USE_C99_CTYPE_TR1 is not defined if VxWorks
> has isblank, the configure check is:
Oh, hmm, very good point. The reason was that the definition
of isblank is conditioned on _C99/_HAS_C9X as well, so the need
for which we had introduced the definition in os_defines.h
would better be generalized.
* config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): Define
_C99 for C++.
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -328,6 +328,10 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
if (!flag_isoc99 && !c_dialect_cxx()) \
builtin_define ("_ALLOW_KEYWORD_MACROS"); \
} \
+ /* C++ support relies on C99 features. Make sure they are \
+ exposed by the system headers. */ \
+ if (c_dialect_cxx()) \
+ builtin_define("_C99"); \
} \
while (0)
Works with the two libstdc++ changes reverted, and gives
"configure" a better view of what's there.
Makes sense?
More information about the Libstdc++
mailing list