This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: fseek() vs. fseeko()
On 06/19/2012 04:08 PM, Corinna Vinschen wrote:
Along these lines, fgetpos and fsetpos are a bit tricky since they
depend on the definition of fpos_t in include/stdio.h. Right now,
only Cygwin defines fpos_t as 64 bit type in stdio.h, all other
targets define fpos_t as 32 bit and fpos64_t as 64 bit type to make
a clear distinction between the 32 bit and the 64 bit set of functions.
RTEMS has this in <machine/_types.h>:
#if defined(__arm__) || defined(__i386__) || defined(__m68k__) ||
defined(__mips__) || defined(__PPC__) || defined(__sparc__)
/* Use 64bit types */
typedef __int64_t _off_t;
#define __off_t_defined 1
typedef __int64_t _fpos_t;
#define __fpos_t_defined 1
#else
/* Use 32bit types */
typedef __int32_t _off_t;
#define __off_t_defined 1
typedef __int32_t _fpos_t;
#define __fpos_t_defined 1
#endif
Thus for some targets fpos_t is 64-bit.
--
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.