1 #include "stdio_impl.h"
6 off_t __ftello_unlocked(FILE *f)
8 off_t pos = f->seek(f, 0,
9 (f->flags & F_APP) && f->wpos > f->wbase
10 ? SEEK_END : SEEK_CUR);
11 if (pos < 0) return pos;
13 /* Adjust for data in buffer. */
14 return pos - (f->rend - f->rpos) + (f->wpos - f->wbase);
17 off_t __ftello(FILE *f)
21 pos = __ftello_unlocked(f);
28 off_t pos = __ftello(f);
36 weak_alias(__ftello, ftello);