diff --git a/include/ctype.h b/include/ctype.h index 554ece9553..2282bd09db 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -35,7 +35,7 @@ #include #include -#ifndef _MSC_VER +#ifdef CONFIG_LIBCXXTOOLCHAIN /* GNU libstdc++ is expecting ctype.h to define a few macros for * locale related functions like C++ streams. diff --git a/libs/libc/ctype/lib_ctype.c b/libs/libc/ctype/lib_ctype.c index b97076cc97..d369a33f31 100644 --- a/libs/libc/ctype/lib_ctype.c +++ b/libs/libc/ctype/lib_ctype.c @@ -32,7 +32,7 @@ * Macro Definitions ****************************************************************************/ -#if defined(_MSC_VER) +#ifndef CONFIG_LIBCXXTOOLCHAIN /* MSVC seems to conflict with theses macro if defined in the public area. * As such, they are defined in the private section to let NuttX build @@ -47,7 +47,7 @@ #define _X 0100 #define _B 0200 -#endif +#else /**************************************************************************** * Private Types @@ -98,3 +98,6 @@ const char _ctype_[] = /**************************************************************************** * Private Functions ****************************************************************************/ + +#endif +