mirror of
https://github.com/fluencelabs/musl
synced 2025-07-02 16:12:02 +00:00
properly pass current locale to *_l functions when used internally
this change is presently non-functional since the callees do not yet use their locale argument for anything.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#include <locale.h>
|
||||
#include <time.h>
|
||||
#include <limits.h>
|
||||
#include "locale_impl.h"
|
||||
#include "libc.h"
|
||||
#include "time_impl.h"
|
||||
|
||||
@ -263,7 +264,7 @@ size_t __strftime_l(char *restrict s, size_t n, const char *restrict f, const st
|
||||
|
||||
size_t strftime(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm)
|
||||
{
|
||||
return __strftime_l(s, n, f, tm, 0);
|
||||
return __strftime_l(s, n, f, tm, CURRENT_LOCALE);
|
||||
}
|
||||
|
||||
weak_alias(__strftime_l, strftime_l);
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <wchar.h>
|
||||
#include <time.h>
|
||||
#include <locale.h>
|
||||
#include "locale_impl.h"
|
||||
#include "libc.h"
|
||||
|
||||
const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc);
|
||||
@ -64,7 +65,7 @@ size_t __wcsftime_l(wchar_t *restrict s, size_t n, const wchar_t *restrict f, co
|
||||
|
||||
size_t wcsftime(wchar_t *restrict wcs, size_t n, const wchar_t *restrict f, const struct tm *restrict tm)
|
||||
{
|
||||
return __wcsftime_l(wcs, n, f, tm, 0);
|
||||
return __wcsftime_l(wcs, n, f, tm, CURRENT_LOCALE);
|
||||
}
|
||||
|
||||
weak_alias(__wcsftime_l, wcsftime_l);
|
||||
|
Reference in New Issue
Block a user