_cs_funcs.c 683 B

12345678910111213141516171819202122232425
  1. /* Copyright (C) 2004-2005 Manuel Novoa III <mjn3@codepoet.org>
  2. *
  3. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  4. *
  5. * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
  6. */
  7. #include "_stdio.h"
  8. /**********************************************************************/
  9. int attribute_hidden __stdio_seek(FILE *stream, register __offmax_t *pos, int whence)
  10. {
  11. __offmax_t res;
  12. #ifdef __UCLIBC_HAS_LFS__
  13. res = lseek64(stream->__filedes, *pos, whence);
  14. #else
  15. res = lseek(stream->__filedes, *pos, whence);
  16. #endif
  17. return (res >= 0) ? ((*pos = res), 0) : ((int) res);
  18. }
  19. /**********************************************************************/