RTEMS Targets Issue #2 - ftello()/fseeko()

Corinna Vinschen vinschen@redhat.com
Mon Mar 21 10:06:00 GMT 2016

On Mar 20 18:19, Yaakov Selkowitz wrote:
> On 2016-03-20 16:14, Corinna Vinschen wrote:
> >On Mar 20 14:18, Yaakov Selkowitz wrote:
> >>On 2016-03-20 07:35, Corinna Vinschen wrote:
> >>>Note especially the _FILE_OFFSET_BITS == 64.  So fseeko/ftello are
> >>>always defined on systems with sizeof(off_t) == 8.
> >>
> >>This is the exception to the "-D_FILE_OFFSET_BITS=64 as no affect on 64-bit
> >>systems" rule; try compiling with -ansi and you should see they are not.
> >>Note that _POSIX_C_SOURCE=200809L is on by default, so maybe that's what
> >>you're seeing?
> >
> >I'm not sure I understand.  I only referred to the man page, I didn't
> >test this.  Can you expand on this a bit?
> _FILE_OFFSET_BITS is just another feature test macro, which means that off_t
> should be 64-bit, and standard functions which use off_t should be
> redirected to the 64-bit variants.  It is not defined automatically on
> 64-bit platforms (even where off_t is *naturally* 64-bit).
> I still have to implement this and the _LARGEFILE64_SOURCE (which exposes
> off64_t and the open64 family of functions) feature test macros.  This is a
> bit tricky because Cygwin is different from other platforms in this regard.
> For now, adding my pending patch for POSIX.1-2001 enablement should suffice.

Ok.  Thanks for the explanation.  Pleae go ahead with your patch.


Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20160321/6462eb61/attachment.sig>

More information about the Newlib mailing list