LibC: Implement `strcoll_l`

This commit is contained in:
Bananymous 2025-04-22 00:41:59 +03:00
parent 107b31a0b5
commit 5c9710c78b
1 changed files with 6 additions and 1 deletions

View File

@ -156,7 +156,12 @@ char* strncat(char* __restrict__ dest, const char* __restrict__ src, size_t n)
int strcoll(const char* s1, const char* s2) int strcoll(const char* s1, const char* s2)
{ {
switch (__getlocale(LC_COLLATE)) return strcoll_l(s1, s2, __getlocale(LC_COLLATE));
}
int strcoll_l(const char *s1, const char *s2, locale_t locale)
{
switch (locale)
{ {
case LOCALE_INVALID: case LOCALE_INVALID:
ASSERT_NOT_REACHED(); ASSERT_NOT_REACHED();