Exactly, but if you like you could do something like this: [code] #if sizeof(int) == 8 #define int64 int #elseif sizeof(long) == 8 #define int64 int ... #endif [/code]
Also it was a long time since I wrote preprocessor code... It could (should) be wrong.
Comments
char = 1 byte
wchar_t = 2 bytes
char < short <= int <= long <= long long
The types "wchar_t" and "long long" are only supported in the latest C standard ISO 9899:1999, also known as "C99".
[code]
#if sizeof(int) == 8
#define int64 int
#elseif sizeof(long) == 8
#define int64 int
...
#endif
[/code]
Also it was a long time since I wrote preprocessor code...
It could (should) be wrong.
EDIT: If the compiler can use 64 bit, it will...
Yeah, the pre-processor has strange syntax :-)