summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libstdio/fseek.c
blob: 5bb96bc6e3417fa910e53a74416a4aaa25771c01 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <dietstdio.h>
#include <unistd.h>

long fseek(FILE *stream, long offset, int whence) {
  fflush(stream);
#ifdef WANT_BUFFERED_STDIO
  stream->bm=0; stream->bs=0;
#endif
  stream->flags&=~(ERRORINDICATOR|EOFINDICATOR);
  return (lseek(stream->fd,offset,whence));
}