fseek() vs. fseeko()

Sebastian Huber sebastian.huber@embedded-brains.de
Tue Jun 19 16:30:00 GMT 2012


It seems that fsetpos() is also limited to long:

int
_DEFUN(_fsetpos_r, (ptr, iop, pos),
        struct _reent * ptr _AND
        FILE * iop          _AND
        _CONST _fpos_t * pos)
{
   int x = _fseek_r (ptr, iop, *pos, SEEK_SET);

   if (x != 0)
     return 1;
   return 0;
}

I think _fseek_r() should be changed to:

int
_DEFUN(_fseek_r, (ptr, fp, offset, whence),
        struct _reent *ptr _AND
        register FILE *fp  _AND
        off_t offset       _AND
        int whence)

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Newlib mailing list