Can we rely solely on __arch64__

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David et al.

So far we have in the .h files used:

#if defined(__sparc__) && defined(__arch64__)

But I just tried with the two sparc gcc's I have here.
Both (as expected) define __sparc__ and only the sparc64 version
define the __arch64__ symbol.

So how about simplifying the checks to read:

#ifdef __arch64__

It is much more strightforward to read.
Testing on __sparc__ in the sparc specific header files
is a noop. And if the header files are anyway used
then the user has much bigger problems than the
32 / 64 bit differences.

I have in the fixed unified ipcbuf.h patch used the
simpler format so please do not apply it if you do not agree.

I started to look into this as it did not feel good to
use something like this:

#if !(defined(__sparc__) && defined(__arch64__))
sparc specific stuff
#endif

I also tried the alternative:
#if defined(__sparc__) && defined(__arch64__)
#else
sparc specific stuff
#endif

Neither looked 'nice'.

I ended up with:
#ifndef __arch64__
sparc specific stuff
#endif

Which was acceptable.

	Sam 
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux