OLD | NEW |
1 #include "stdio_impl.h" | 1 #include "stdio_impl.h" |
2 | 2 |
3 int __fseeko_unlocked(FILE *f, off_t off, int whence) | 3 int __fseeko_unlocked(FILE *f, off_t off, int whence) |
4 { | 4 { |
5 /* Adjust relative offset for unread data in buffer, if any. */ | 5 /* Adjust relative offset for unread data in buffer, if any. */ |
6 if (whence == SEEK_CUR) off -= f->rend - f->rpos; | 6 if (whence == SEEK_CUR) off -= f->rend - f->rpos; |
7 | 7 |
8 /* Flush write buffer, and report error on failure. */ | 8 /* Flush write buffer, and report error on failure. */ |
9 if (f->wpos > f->wbase) { | 9 if (f->wpos > f->wbase) { |
10 f->write(f, 0, 0); | 10 f->write(f, 0, 0); |
(...skipping 22 matching lines...) Expand all Loading... |
33 return result; | 33 return result; |
34 } | 34 } |
35 | 35 |
36 int fseek(FILE *f, long off, int whence) | 36 int fseek(FILE *f, long off, int whence) |
37 { | 37 { |
38 return __fseeko(f, off, whence); | 38 return __fseeko(f, off, whence); |
39 } | 39 } |
40 | 40 |
41 weak_alias(__fseeko, fseeko); | 41 weak_alias(__fseeko, fseeko); |
42 | 42 |
43 LFS64(fseeko); | 43 weak_alias(__fseeko, fseeko64); |
OLD | NEW |