mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23: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
|
@ -29,6 +29,7 @@
|
|||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/locale.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/thread/posixthread.internal.h"
|
||||
#include "libc/thread/thread.h"
|
||||
|
@ -191,6 +192,7 @@ textstartup void __enable_tls(void) {
|
|||
tib->tib_errno = __errno;
|
||||
tib->tib_strace = __strace;
|
||||
tib->tib_ftrace = __ftrace;
|
||||
tib->tib_locale = (intptr_t)&__c_dot_utf8_locale;
|
||||
tib->tib_pthread = (pthread_t)&_pthread_main;
|
||||
if (IsLinux() || IsXnuSilicon()) {
|
||||
// gnu/systemd guarantees pid==tid for the main thread so we can
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue