lkml.org 
[lkml]   [2009]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Confusion in usr/include/asm-generic/fcntl.h
Date
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 <><


\
 
 \ /
  Last update: 2009-01-26 16:57    [W:0.360 / U:4.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site