[PATCH 1/3] Change _offset type from int to _off_t
Sebastian Huber
sebastian.huber@embedded-brains.de
Thu Nov 29 16:33:00 GMT 2012
On 11/26/2012 05:30 PM, Corinna Vinschen wrote:
>>> > >Any suggestions?
>> >
>> >Lets introduce
>> >
>> >#if defined(__rtems__) || X
>> > typedef _off_t __sFile_off_t;
>> >#else
>> > typedef int __sFile_off_t;
>> >#endif
>> >
>> >somewhere.
> That doesn't sound right to me. As I outlined in my previous reply,
> it seems that using int was always wrong and _off_t is the right thing
> to do for all targets.
Yes, I also think that this int is completely wrong, but I cannot judge what to
do for other targets than RTEMS. We have a bug vs. backward binary
compatibility trade off. For RTEMS it is more important to fix the bug.
>
> RTEMS or, FWIW, 64 bit Cygwin (which doesn't exist yet but will have the
> same problem) are more or less no-brainers. My problem, and that's what
> I'd like to have input on is, how do we handle backward compatibility
> for affected 16 bit or LP64 64 bit targets?
For LP64 targets we can use the __sFile_off_t from above if we want to favor
backward binary compatibility. I really have no idea on 16-bit targets. It
seems that nobody used FILE at all or only with small files on them.
--
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