Fix ctypes.h locale macro

This commit is contained in:
Philippe Leduc 2024-10-07 14:50:03 +02:00 committed by Xiang Xiao
parent 31a3cea64a
commit 80e578c9aa
2 changed files with 23 additions and 2 deletions

View file

@ -35,6 +35,23 @@
#include <nuttx/compiler.h>
#include <langinfo.h>
#ifndef _MSC_VER
/* GNU libstdc++ is expecting ctype.h to define a few macros for
* locale related functions like C++ streams.
*/
#define _U 01
#define _L 02
#define _N 04
#define _S 010
#define _P 020
#define _C 040
#define _X 0100
#define _B 0200
#endif
/****************************************************************************
* Inline Functions
****************************************************************************/

View file

@ -32,8 +32,10 @@
* Macro Definitions
****************************************************************************/
/* GNU libstdc++ is expecting ctype.h to define a few macros for
* locale related functions like C++ streams.
#if defined(_MSC_VER)
/* 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
*/
#define _U 01
@ -45,6 +47,8 @@
#define _X 0100
#define _B 0200
#endif
/****************************************************************************
* Private Types
****************************************************************************/