[PATCH 1/3] Change _offset type from int to _off_t
Corinna Vinschen
vinschen@redhat.com
Fri Nov 23 13:16:00 GMT 2012
On Nov 22 12:24, Sebastian Huber wrote:
> 2012-11-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
>
> * libc/include/sys/reent.h (__sFILE): Change type of _offset
> from int to _off_t.
> [...]
> It breaks binary compatibility also on some RTEMS targets, but this is
> not a problem.
It breaks binary compatibility. Full stop. And this is a problem.
If we do that, we must make really sure that this isn't a problem.
For instance, on 32 bit Cygwin, _off_t is 32 bit (while off_t ==
_off64_t), so the change from int to _off_t would not break the ABI.
But newlib is not only RTEMS and Cygwin, that's the problem.
However, see the thread starting at
http://sourceware.org/ml/newlib/2012/msg00214.html
In theory you're not supposed to change struct __sFILE, rather you're
supposed to use struct __sFILE64 and the functions defined in the
libc/stdio64 subdir. This discussion seems to have gone lost.
Apart from that we might consider to retroactively shoot the guy who
introduced the offset as type int. ;)
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
More information about the Newlib
mailing list