mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Allows c++ code to compile with or without CONFIG_LIBC_LOCALE
and will generate a link error if CONFIG_LIBC_LOCALE is not defined and setlocale is referneced. With CONFIG_LIBC_LOCALE defined setlocale will act as if MB string is not supported and return "C" for POSIX. C and ""
This commit is contained in:
+1
-2
@@ -46,11 +46,10 @@
|
||||
// Namespace
|
||||
//***************************************************************************
|
||||
|
||||
#ifdef CONFIG_LIBC_LOCALE
|
||||
namespace std
|
||||
{
|
||||
using ::setlocale;
|
||||
using ::localeconv;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __INCLUDE_CXX_CLOCALE
|
||||
|
||||
@@ -43,8 +43,6 @@
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#ifdef CONFIG_LIBC_LOCALE
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@@ -109,5 +107,4 @@ FAR struct lconv *localeconv(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_LIBC_LOCALE */
|
||||
#endif /* __INCLUDE_LOCALE_H */
|
||||
|
||||
Reference in New Issue
Block a user