|
|
Hi,
I'm trying to do develop a portable OS (a multiboot kernel for IA32 and
AMD64 architectures). And I'm using FreeBSD (as host OS), and GCC 4.2
(as compiler). Now I need to define multiboot structures here. I want
to know how to define these portably. I'm expecting something like
following:
-- begin code for "C" language --
#ifdef AMD64
typedef unsigned int u32;
typedef unsigned long u64;
#elif defined(IA32)
typedef unsigned long u32;
typedef unsigned long long u64;
#else
#error Unsupported architecture
#endif
u32 stuff32;
u64 stuff64;
-- end code --
So, my question is what are the architecture specific "preprocessor
defines" in GCC ? I've already seen its manual.
Thanks in advance,
Ashish Shukla
|
|