[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200901261653.32856.arnd@arndb.de>
Date:	Mon, 26 Jan 2009 16:53:32 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Jaswinder Singh Rajput <jaswinder@...nel.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	David Miller <davem@...emloft.net>, mingo@...e.hu,
	x86@...nel.org, linux-kernel@...r.kernel.org,
	Sam Ravnborg <sam@...nborg.org>
Subject: Re: Confusion in usr/include/asm-generic/fcntl.h
On Friday 23 January 2009, Jaswinder Singh Rajput wrote:
> 
> So who wins the race for CONFIG_64BIT and will be right candidate for
> usr/include/asm-generic/fcntl.h:
> 
> 1. #if BITS_PER_LONG == 64
namespace pollution => doesn't work
> OR
> 
> 2. #if __BITS_PER_LONG == 64
my suggestion, looks good
> 
> OR
> 
> 3. #ifdef __LP64__
Should work, but not sure if all compilers get it right
> 
> OR
> 
> 4. #if __SIZEOF_POINTER__ == 8
Never heard of this, but seems fine, probably __SIZEOF_LONG__
would be more logical (but with identical results)
> 
> OR
> 
> 5. #if LONG_MAX > 2147483647L
requires #include <stdint.h>, which pollutes the namespace => doesn't work
> OR
> 
> 6. #ifdef __64BIT
Dangerous, as explained.
	Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
