rework langinfo code for ABI compat and for use by time code
[musl] / src / locale / uselocale.c
1 #include "locale_impl.h"
2 #include "pthread_impl.h"
3 #include "libc.h"
4
5 locale_t uselocale(locale_t l)
6 {
7         pthread_t self = pthread_self();
8         locale_t old = self->locale;
9         if (l) self->locale = l;
10         return old;
11 }
12
13 weak_alias(uselocale, __uselocale);