mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 03:08:31 +00:00
Get GNU GMP test suite fully passing
- Fix stdio fmemopen() buffer behaviors - Fix scanf() to return EOF when appropriate - Prefer fseek/ftell names over fseeko/ftello - Ensure locale field is always set in the TIB - Fix recent regression in vfprintf() return count - Make %n directive in scanf() have standard behavior
This commit is contained in:
parent
755ae64e73
commit
63a1636e1f
20 changed files with 228 additions and 51 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/locale.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/thread/spawn.h"
|
||||
#include "libc/thread/tls.h"
|
||||
|
@ -41,6 +42,7 @@ static char *_mktls_finish(struct CosmoTib **out_tib, char *mem,
|
|||
tib->tib_ftrace = old->tib_ftrace;
|
||||
tib->tib_strace = old->tib_strace;
|
||||
tib->tib_sigmask = old->tib_sigmask;
|
||||
tib->tib_locale = (intptr_t)&__c_dot_utf8_locale;
|
||||
atomic_store_explicit(&tib->tib_tid, -1, memory_order_relaxed);
|
||||
if (out_tib) {
|
||||
*out_tib = tib;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue