Two small fixes for s/390.
Jakub Jelinek
jakub@redhat.com
Thu Dec 20 03:59:00 GMT 2001
On Thu, Dec 20, 2001 at 12:54:23PM +0100, Andreas Jaeger wrote:
> "Martin Schwidefsky" <schwidefsky@de.ibm.com> writes:
>
> >> > Ok, I can do that. I'll clean up sysdeps/s390/bits/string.h as well
> >> > because I use the same #ifdef there.
> >>
> >> Is that really needed? For bi-arch support, we should leave
> >> bits/string.h as it is so that you can compile 32-bit and 64-bit apps
> >> with that header...
> >
> > You have a point here. If we want to do bi-arch support sometime, we
> > need to have a way to distinguish between 31/32-bit and 64-bit in the
> > header files. __s390x__ versus __s390__ is one way to do it, is there
> > a better one ?
>
> Sparc uses:
> #if __WORDSIZE == 64
>
> #endif
>
> I'm not sure what's better but it's an alternative ;-)
Well, first of all s390 and s390x would need to supply their own
bits/wordsize.h.
Then, I think it is pretty grey area. If the thing depends on word size of
the machine, then I'd use __WORDSIZE, if it depends on some other aspect of
the architecture, then __s390__ or __s390x__ is more appropriate.
Jakub
More information about the Libc-hacker
mailing list