This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: [PATCH roland/off64_t] clean up wordsize-64 off_t functions


On 8/2/2012 1:21 PM, Roland McGrath wrote:
> If there are any linux-generic configurations where off_t matches off64_t,
> i.e. __SLONGWORD_TYPE matches __SQUAD_TYPE (tilegx64?), then that will need
> some additional attention too.  I'm not sure how best to handle that.
> It would be nice not to add another bits/typesizes.h, but it may be
> unavoidable unless every such machine predefines __LP64__ or something
> like that.  In trunk GCC it looks like that is done generically, but I
> don't know if all relevant GCC versions did that.

Yes, it's correct that tilegx64 has off_t == off64_t.

I think using "#ifdef __LP64__" in
ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h is a reasonable
approach here; it's certainly true for tile that gcc supports __LP64__ that
way, and since as you say it's generic in gcc, I think we can assume that
any new platform that incorporates support for linux-generic will also
properly support __LP64__.

Alternately, I suppose, one could #include <bits/wordsize.h> in
<bits/typesizes.h> and test __WORDSIZE == 64.  But I don't think it's
necessary.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]