This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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: Two small fixes for s/390.


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


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