lkml.org 
[lkml]   [2009]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] asm-generic/{unistd,types,posix_types}.h for new arch
Arnd Bergmann wrote:
>
> Unfortunately, there is no generic way to detect the word size yet,
> but every architecture uses its own preprocessor macro (__x86_64__,
> __s390x__, __ppc64__). We also can't use CONFIG_64BIT in an user-exported
> interface header file, because the use space can also be compiled for
> 32 bits when the kernel uses 64 bits.
>

Actually, gcc does have the _LP64 and __SIZEOF_POINTER__ macros (as well
as __CHAR_BIT__), although I don't know how far back it does have that.
If it has been with us for long enough it might be possible to
switch over to using panarch macros.

-hpa



\
 
 \ /
  Last update: 2009-04-01 23:25    [W:0.050 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site