LibC: Add __fseterr
This is used by some ports to not require internal FILE structure
This commit is contained in:
@@ -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 vsscanf(const char* __restrict s, const char* __restrict format, va_list arg);
|
||||
|
||||
void __fseterr(FILE* stream);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -134,6 +134,12 @@ void clearerr(FILE* file)
|
||||
file->error = false;
|
||||
}
|
||||
|
||||
void __fseterr(FILE* file)
|
||||
{
|
||||
ScopeLock _(file);
|
||||
file->error = true;
|
||||
}
|
||||
|
||||
char* ctermid(char* buffer)
|
||||
{
|
||||
static char s_buffer[L_ctermid];
|
||||
|
||||
Reference in New Issue
Block a user