Cygwin off_t, dev_t, uid_t and gid_t definitions

Corinna Vinschen vinschen@redhat.com
Wed Apr 13 09:19:00 GMT 2016


On Apr 13 11:12, Sebastian Huber wrote:
> On 13/04/16 11:07, Corinna Vinschen wrote:
> >Ok, one step back.  Right now we have newlib's stdio using _off_t and
> >newlib's stdio64 _off64_t.  The assumption is that on 32 bit platforms
> >_off_t is a 32 bit type, thus we need _off64_t and stdio64 to implement
> >64 bit file access.
> 
> Ok, the _off_t is 64-bit on the main RTEMS targets. I was not aware that
> there is a stdio64. This explains some of my confusion.

stdio64 allows to define 32 and 64 bit stdio functions on 32 bit
targets.  As I said, we're using this in Cygwin just to pamper really
old executables from pre-64bit-off_t times, but that requires to
have two off_t's on 32 bit.  I'm not happy either with this complication
and I guess we will drop this compatibility stuff in Cygwin in not
too far a future.

> >If we change the definitions of _off_t and _off64_t we're bound to break
> >newlib and probably not only when being used by Cygwin.
> >
> >I'd like to suggest the following.  If that's exactly what you suggested,
> >bear with me, I'just m trying to wrap my head around this in public:)
> >
> >- Keep _off_t and _off64_t definitions intact.
> >
> >- Define __off_t in sys/_types.h as the same type as _off_t, unless
> >   we're running on Cygwin.  In that case __off_t should be defined
> >   as always 64 bit.
> 
> Ok, this makes sense.
> 
> >This should probably go into Cygwin's not yet
> >   existing machine/_types.h.
> 
> No, the <machine/_types.h> is responsible to define _off_t.

?!?  Where's __off_t defined then?


Corinna

-- 
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/20160413/0625c9a8/attachment.sig>


More information about the Newlib mailing list