source:
trunk/sys/dietlibc/fseek.c
@
126
Last change on this file since 126 was 1, checked in by , 8 years ago | |
---|---|
File size: 388 bytes |
Line | |
---|---|
1 | #include "dietstdio.h" |
2 | #include <unistd.h> |
3 | |
4 | int 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 | |
12 | int fseek(FILE *stream, long offset, int whence) __attribute__((weak,alias("fseek_unlocked"))); |
Note: See TracBrowser
for help on using the repository browser.