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:
Gregory Nutt
2016-10-19 17:44:52 +00:00
3 changed files with 4 additions and 7 deletions
+3 -2
View File
@@ -43,6 +43,7 @@
#include <locale.h>
#ifdef CONFIG_LIBC_LOCALE
#include <string.h>
/****************************************************************************
* Public Functions
@@ -62,8 +63,8 @@
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