mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
Merged in david_s5/nuttx/upstream_local_fix_to_greg (pull request #153)
DO NOT MERGE Until Alan Verifies this -
This commit is contained in:
+1
-2
@@ -46,11 +46,10 @@
|
|||||||
// Namespace
|
// Namespace
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
|
|
||||||
#ifdef CONFIG_LIBC_LOCALE
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
using ::setlocale;
|
using ::setlocale;
|
||||||
|
using ::localeconv;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __INCLUDE_CXX_CLOCALE
|
#endif // __INCLUDE_CXX_CLOCALE
|
||||||
|
|||||||
@@ -43,8 +43,6 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#ifdef CONFIG_LIBC_LOCALE
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -109,5 +107,4 @@ FAR struct lconv *localeconv(void);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_LIBC_LOCALE */
|
|
||||||
#endif /* __INCLUDE_LOCALE_H */
|
#endif /* __INCLUDE_LOCALE_H */
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#ifdef CONFIG_LIBC_LOCALE
|
#ifdef CONFIG_LIBC_LOCALE
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@@ -62,8 +63,8 @@
|
|||||||
|
|
||||||
FAR char *setlocale(int category, FAR const char *locale)
|
FAR char *setlocale(int category, FAR const char *locale)
|
||||||
{
|
{
|
||||||
/* NULL indicates the the locale was not changed */
|
|
||||||
|
|
||||||
return NULL;
|
return ((strcmp (locale, "POSIX") == 0 || strcmp (locale, "C") == 0 ||
|
||||||
|
strcmp (locale, "") == 0) ? "C" : NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user