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

Re: where are __amd64 and __i386 defined?



"Star Liu" <minxinjianxin@gmail.com> writes:

> I read this line in a c source file:
> #if defined (__sun) && (defined(__i386) || defined(__amd64))
> I'm wondering where are __sun  __amd and 64 __i386 defined?

They're defined by the compiler.  There's a "standard" set of such defines
that the compiler sets up automatically (standard in the sense that every
time I need to figure out what they are, I have to go grovelling through
arcane compiler flags or obscure documentation).

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: