This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH roland/off64_t] clean up wordsize-64 off_t functions
- From: Chris Metcalf <cmetcalf at tilera dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: <libc-alpha at sourceware dot org>, <libc-ports at sourceware dot org>
- Date: Thu, 2 Aug 2012 14:13:45 -0400
- Subject: Re: [PATCH roland/off64_t] clean up wordsize-64 off_t functions
- References: <20120802172110.E4A912C0DF@topped-with-meat.com>
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