tell.c 241 B

123456789101112131415
  1. #define lseek __normal_lseek
  2. #include <unistd.h>
  3. #include <syscall.h>
  4. #undef lseek
  5. static inline
  6. _syscall3(off_t,lseek,int,fildes,off_t,offset,int,origin)
  7. off_t tell(int);
  8. off_t
  9. tell (int fildes)
  10. {
  11. return lseek (fildes, 0, SEEK_CUR);
  12. }