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] |
On Nov 23 13:24, Sebastian Huber wrote:On 11/23/2012 11:21 AM, Corinna Vinschen wrote: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.
Yes, this is a problem, but not for RTEMS.
If we do that, we must make really sure that this isn't a problem.
We can add a new type, which is int by default and for example _off_t on RTEMS.
But this new type doesn't match your fseeko/ftello implementation anymore.
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.
Ok, and how can I do this. Is this a configure option? I don't want to use fseeko64() directly.
Why not? Cygwin is doing the same. The application calls fseeko, but internally Cygwin calls fseeko64 since the link lib redirects the call. fseeko64 does not exist on the application level.
-- 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.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |