implement uselocale function (minimal)

This commit is contained in:
Rich Felker
2011-05-30 01:41:23 -04:00
parent 9a59faab3c
commit 11c531e21d
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -12,6 +12,7 @@
#include <setjmp.h>
#include <string.h>
#include <time.h>
#include <locale.h>
#include "libc.h"
#include "syscall.h"
#include "atomic.h"
@@ -44,6 +45,7 @@ struct pthread {
} robust_list;
int unblock_cancel;
int delete_timer;
locale_t locale;
};
struct __timer {
+10
View File
@@ -0,0 +1,10 @@
#include "locale_impl.h"
#include "pthread_impl.h"
locale_t uselocale(locale_t l)
{
pthread_t self = pthread_self();
locale_t old = self->locale;
if (l) self->locale = l;
return old;
}