Skip to content

Commit

Permalink
LibC: Return a default locale from localeconv(). (For GCC 8.3.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Apr 22, 2019
1 parent 9f122bf commit 1d02c7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion LibC/locale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

extern "C" {

static struct lconv default_locale = {
".",
",",
"\x03\x03",
};

char* setlocale(int category, const char* locale)
{
dbgprintf("FIXME(LibC): setlocale(%d, %s)\n", category, locale);
Expand All @@ -12,7 +18,7 @@ char* setlocale(int category, const char* locale)

struct lconv* localeconv()
{
assert(false);
return &default_locale;
}

}

0 comments on commit 1d02c7b

Please sign in to comment.