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

Re: where are __amd64 and __i386 defined?



thanks for your description, i finally found the doc: http://predef.sourceforge.net/prearch.html, it's a little hard. :)

On Mon, Jun 30, 2008 at 1:27 PM, Russ Allbery <rra@debian.org> wrote:
"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/>


--
To UNSUBSCRIBE, email to debian-mentors-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org




--
---------------------------------------------------------------------------------------------------------------------------------------------
Homepage: http://starliu.9966.org, about Buddha, x86_64 CPU, Debian GNU/Linux Lenny AMD64, UEFI/BIOS
---------------------------------------------------------------------------------------------------------------------------------------------
Reply to: