mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 12:18: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
|
@ -59,11 +59,11 @@ static void vflogf_onfail(FILE *f) {
|
|||
(err == ENOSPC || err == EDQUOT || err == EFBIG) &&
|
||||
(fstat(fileno_unlocked(f), &st) == -1 || st.st_size > kNontrivialSize)) {
|
||||
ftruncate(fileno_unlocked(f), 0);
|
||||
fseeko_unlocked(f, SEEK_SET, 0);
|
||||
fseek_unlocked(f, SEEK_SET, 0);
|
||||
f->beg = f->end = 0;
|
||||
clearerr_unlocked(f);
|
||||
(fprintf_unlocked)(f, "performed emergency log truncation: %s\n",
|
||||
strerror(err));
|
||||
fprintf_unlocked(f, "performed emergency log truncation: %s\n",
|
||||
strerror(err));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue