bug-parted
[Top][All Lists]
Advanced

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

RE: [PATCH] allow -Werror on IA-64 with GPT enabled


From: Matt_Domsch
Subject: RE: [PATCH] allow -Werror on IA-64 with GPT enabled
Date: Fri, 5 Oct 2001 20:09:12 -0500

> What does #ifdef __LP64__ mean?  (my rather old gcc and libc 
> info pages
> don't mention it)  From looking on gcc archives, it means "32 bit int,
> 64 bit longs and pointers")

Yes, exactly.

> Shouldn't we be checking for something like #if sizeof(int) 
> == 8 instead?

sizeof(long), but that didn't work for me.  gcc errored out on such a
consruct.
The simple:
        touch foo.c
        gcc -dM -E foo.c
spits out all the #defines set by gcc for you.  __LP64__ is the best of
those.   BITS_PER_LONG is what I'd use in the kernel, but it isn't set from
user space.  __LP64__ accurately describes what we're looking for.  If longs
are 64 bits, print with %lx.  Otherwise, print with %llx.  Works fine until
we get to >64 bit computing, which will be necessary within our lifetime.
:-)

Thanks,
Matt

-- 
Matt Domsch
Sr. Software Engineer
Dell Linux Solutions
www.dell.com/linux
#2 Linux Server provider with 17% in the US and 14% Worldwide (IDC)!
#3 Unix provider with 18% in the US (Dataquest)!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]