options/ansi: Do not fail on relative seeks
@@ -219,8 +219,8 @@ int abstract_file::seek(off_t offset, int whence) {
if(int e = _write_back(); e)
return e;
- if(whence == SEEK_SET || whence == SEEK_END) {
- // For absolute seeks we can just forget the current buffer.
+ // We just forget the current buffer.
+ // TODO: If the seek is "small", we can just modify our internal offset.
if(int e = _reset(); e)
return e;
@@ -230,11 +230,6 @@ int abstract_file::seek(off_t offset, int whence) {
return e;
}
return 0;
- }else{
- __ensure(whence == SEEK_CUR); // TODO: Handle errors.
- mlibc::panicLogger() << "mlibc: Implement relative seek for FILE" << frg::endlog;
- __builtin_unreachable();
- }
}
int abstract_file::_init_type() {
