mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibC: Let setlocale() pretend that setting the locale succeeded
By returning nullptr we're telling the caller that setlocale() failed. Some programs expect setlocale() to succeed so let's pretend that it did.
This commit is contained in:
parent
431bed5158
commit
4cd45f5875
Notes:
sideshowbarker
2024-07-18 16:51:46 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/4cd45f5875e Pull-request: https://github.com/SerenityOS/serenity/pull/7795
1 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <assert.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
@ -46,7 +47,9 @@ static struct lconv default_locale = {
|
|||
|
||||
char* setlocale(int, const char*)
|
||||
{
|
||||
return nullptr;
|
||||
static char locale[2];
|
||||
memcpy(locale, "C", 2);
|
||||
return locale;
|
||||
}
|
||||
|
||||
struct lconv* localeconv()
|
||||
|
|
Loading…
Reference in a new issue