source:
trunk/sys/dietlibc/fseek.c
@
8
| Last change on this file since 8 was 1, checked in by , 9 years ago | |
|---|---|
| File size: 388 bytes | |
| Rev | Line | |
|---|---|---|
| [1] | 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.
