This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fseek() vs. fseeko()


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]