LibC: Add __fseterr

This is used by some ports to not require internal FILE structure
This commit is contained in:
2026-05-22 20:42:23 +03:00
parent 8fccb74542
commit ee5c225954
2 changed files with 8 additions and 0 deletions

View File

@@ -127,6 +127,8 @@ int vsnprintf(char* __restrict s, size_t n, const char* __restrict format, va_l
int vsprintf(char* __restrict s, const char* __restrict format, va_list ap); int vsprintf(char* __restrict s, const char* __restrict format, va_list ap);
int vsscanf(const char* __restrict s, const char* __restrict format, va_list arg); int vsscanf(const char* __restrict s, const char* __restrict format, va_list arg);
void __fseterr(FILE* stream);
__END_DECLS __END_DECLS
#endif #endif

View File

@@ -134,6 +134,12 @@ void clearerr(FILE* file)
file->error = false; file->error = false;
} }
void __fseterr(FILE* file)
{
ScopeLock _(file);
file->error = true;
}
char* ctermid(char* buffer) char* ctermid(char* buffer)
{ {
static char s_buffer[L_ctermid]; static char s_buffer[L_ctermid];