blob: 1a2ced3eb4bd78aa0230674f72151155a94cd236 [file] [log] [blame]
/*
* fseek.c
*/
#include "stdioint.h"
__extern int fseek(FILE *f, off_t where, int whence)
{
off_t rv;
fflush(f);
rv = lseek(f->fd, where, whence);
if (rv != -1) {
f->filepos = rv;
f->bytes = 0;
f->flags &= ~_IO_FILE_FLAG_READ;
return 0;
} else {
return -1;
}
}