mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibC: Implement __fseterr
This commit is contained in:
parent
4f706d819a
commit
3237efc661
Notes:
sideshowbarker
2024-07-17 14:32:27 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/3237efc661 Pull-request: https://github.com/SerenityOS/serenity/pull/13333
3 changed files with 8 additions and 0 deletions
|
@ -44,6 +44,7 @@ public:
|
|||
|
||||
int error() const { return m_error; }
|
||||
void clear_err() { m_error = 0; }
|
||||
void set_err() { m_error = 1; }
|
||||
|
||||
size_t read(u8*, size_t);
|
||||
size_t write(u8 const*, size_t);
|
||||
|
|
|
@ -1369,6 +1369,12 @@ void __freadptrinc(FILE* stream, size_t increment)
|
|||
|
||||
stream->readptr_increase(increment);
|
||||
}
|
||||
|
||||
void __fseterr(FILE* stream)
|
||||
{
|
||||
ScopedFileLock lock(stream);
|
||||
stream->set_err();
|
||||
}
|
||||
}
|
||||
|
||||
template bool FILE::gets<u8>(u8*, size_t);
|
||||
|
|
|
@ -18,5 +18,6 @@ void __fpurge(FILE*);
|
|||
size_t __freadahead(FILE*);
|
||||
char const* __freadptr(FILE*, size_t*);
|
||||
void __freadptrinc(FILE*, size_t);
|
||||
void __fseterr(FILE*);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Reference in a new issue