fxlibc/src/libc/locale/setlocale.c

19 lines
570 B
C

#include <locale.h>
/*
** This stub locale implementation only supports the "C" locale. For several
** targets there is no filesystem/LOCPATH/database of locale values, so this is
** the only setting that can always be supported. It is also sufficient to
** support when porting Linux programs because Linux does not guarantee that
** other locales will be available.
*/
char *setlocale(__attribute__((unused)) int category, char const *locale)
{
if(locale) {
if(locale[0] == 0) locale = "C";
if(locale[0] != 'C' || locale[1] != 0) return NULL;
}
return "C";
}