lkml.org 
[lkml]   [1998]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.1.101 warnings on alpha (patch)
Hi!

> How does one check whether the host is 64bitty? Like in the above
> "#if" or is there another (standard) way?
>
> Unfortunately there is no failsafe way. This is because as a cross
> compiler gcc from 32-->64 bit does not get things like:
>
> #if ((~0UL)==0xffffffff)
> ... 32bit version ...
> #else
> ... 64bit version ...
> #endif
>
> correct at all. I think it should be in an asm header file
> personally, but if you notice the check for 64-bit is often done as:

I think that

+#if BITS_PER_LONG == 64

is good, clean, etc. way. What is wrong with it?


> which is pretty unclean and should be fixed up. But at the moment
> there is no other reliable way to check it.

I believe that BITS_PER_LONG should be reliable - it was designed to
be!

Pavel

--
The best software in life is free (not shareware)! Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.324 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site