source: trunk/sys/dietlibc/fseek.c @ 270

Last change on this file since 270 was 1, checked in by alain, 8 years ago

First import

File size: 388 bytes
Line 
1#include "dietstdio.h"
2#include <unistd.h>
3
4int fseek_unlocked(FILE *stream, long offset, int whence) {
5  fflush_unlocked(stream);
6  stream->bm=0; stream->bs=0;
7  stream->flags&=~(ERRORINDICATOR|EOFINDICATOR);
8  stream->ungotten=0;
9  return lseek(stream->fd,offset,whence) != -1 ? 0 : -1;
10}
11
12int fseek(FILE *stream, long offset, int whence) __attribute__((weak,alias("fseek_unlocked")));
Note: See TracBrowser for help on using the repository browser.