It would be unfair to say it is poor programming not to have "natural" 64-bits support. 64-bits support when programming on a 32-bits platform has to be seriously planned in advance, and even then it requires corrections once you switch to the actual 64-bits platform. It is an outstanding effort to support both, C is like that, close to the "machine". If you want hardware indepence, use Java or something else. EQEmu is in C, we have to live with that.
Problems do not only occur when casting values, but for example when reading binary data from files (ints are not the same size). Cross-processor compatibility support (like in PowerPC vs Intel) could mitigate this problem, but EQEmu on Mac is not really something I have heard of. We have to live with that too !
That said, I will answer the question of gaeorn :
The surefire way to ensure you do not alter 32-bits code when adding changes for 64-bits support is to use #defines. Everytime you need to replace an existing portion of code with your new code you use something like this :
Code:
#ifdef __64_bits__
<your new code>
#else /* __64_bits__ */
<the old code>
#endif /* __64_bits__ */
The comments are there for readability (especially if you have tens of lines of code in there), and cost nothing.
Obviously you also have to #define the __64_bits__ macro somewhere when you are on a 64-bits plaform. It can be done on the compile-line with a -D__64_bits__ flag (read : your Makefile). There could be an existing flag for your compile platform but I cannot remember it off-hand. If it exists then just use it instead of my made-up macro.
I can remember trying to compile EQEmu for 64-bits a year ago (and succeeding), but running the executables failed miserably with a segmentation fault. Not a surprise really, as the code is not meant to support it. Be warned this can be very tough to fix.
One hint : on a 64-bits Linux platform you can always create a chroot 32-bits installation to run your programs with everything 32-bits. That is how I use EQEmu on my (native 64-bits) server. The details vary depending on your distribution, I am on Gentoo and they provide a nice "how-to" on how to create the 32-bits chroot environment. Just know that you will need as much HD space as you use on your main Linux root to support it. Yes, it works fine.
Good luck
