diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-07-02 21:46:41 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-07-02 21:46:41 -0400 |
commit | 4c48501ee2a022a0dd207a2db4d346a00f9927a1 (patch) | |
tree | 59167ab2975dfdf087be1033c72cd591f4c6e1f0 /src/time | |
parent | 7424ac58b1f47adb03de55de5998c530aee91551 (diff) | |
download | musl-4c48501ee2a022a0dd207a2db4d346a00f9927a1.tar.gz musl-4c48501ee2a022a0dd207a2db4d346a00f9927a1.tar.bz2 musl-4c48501ee2a022a0dd207a2db4d346a00f9927a1.tar.xz musl-4c48501ee2a022a0dd207a2db4d346a00f9927a1.zip |
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.
Diffstat (limited to 'src/time')
-rw-r--r-- | src/time/strftime.c | 3 | ||||
-rw-r--r-- | src/time/wcsftime.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/time/strftime.c b/src/time/strftime.c index 75ebca62..794fbe1d 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -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); diff --git a/src/time/wcsftime.c b/src/time/wcsftime.c index 8d2a2ebc..638e64f6 100644 --- a/src/time/wcsftime.c +++ b/src/time/wcsftime.c @@ -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); |