I’m guessing we are going to have to be careful as we get more 64 bit
builds/machines. (Not made easy by differences in C compilers for
different platforms, of course.)
from gcc manual … for AMD x86-64
-m32
-m64
Generate code for a 32-bit or 64-bit environment. The 32-bit
environment sets int, long and pointer to 32 bits and generates code
that runs on any i386 system. The 64-bit environment sets int to 32
bits and long and pointer to 64 bits and generates code for AMD’s
x86-64 architecture.
from gcc manual … for PowerPC
-m32
-m64
Generate code for 32-bit or 64-bit environments of Darwin and SVR4
targets (including GNU/Linux). The 32-bit environment sets int, long
and pointer to 32 bits and generates code that runs on any PowerPC
variant. The 64-bit environment sets int to 32 bits and long and
pointer to 64 bits, and generates code for PowerPC64, as for
-mpowerpc64
At least gcc is compatible with itself across these two processors
for longs and ints!
Apple has a table with interesting size information related to int,
long, long long and pointers here (three quarters down the page).
http://developer.apple.com/macosx/64bit.html
Not sure which “Windows” they are specifically talking about - and no
idea what Visual Studio does (does it even support 64-bit yet?)
Regards,
Rob>On Thursday 30 December 2004 21:20, Thomas Harning Jr. wrote:
On my Gentoo AMD64 system [compiled 64-bit] I am having difficulties
w/ Gamepad & Joystick inputs.
On Mon, 16 May 2005, Tyler Montbriand wrote:
I believe I have located the issue.
/* from /usr/include/linux/joystick.h… */
struct JS_DATA_SAVE_TYPE {
int JS_TIMEOUT;
int BUSY;
long JS_EXPIRETIME;
long JS_TIMELIMIT;
struct JS_DATA_TYPE JS_SAVE;
struct JS_DATA_TYPE JS_CORR;
};See those longs? They’re 64-bit under 64-bit and 32-bit under 32-bit. Ergo
the 32-bit and 64-bit versions aren’t using the same structure. Now, I don’t
know how to solve this, maybye those two do need to be long’s. Or maybye
they don’t.