LibC: Implement __fpending

Some gnu programs want this and I don't want to make FILE non-opaque
This commit is contained in:
2026-07-07 15:23:31 +03:00
parent 89fa957297
commit 304f94f3b1
2 changed files with 7 additions and 0 deletions

View File

@@ -134,6 +134,12 @@ void clearerr(FILE* file)
file->error = false;
}
size_t __fpending(FILE* file)
{
ScopeLock _(file);
return file->buffer_rd_size ? 0 : file->buffer_idx;
}
void __fseterr(FILE* file)
{
ScopeLock _(file);