Before you begin to update your code, you should familiarize yourself with the document Mac OS X Technology Overview. After reading that document, the first thing you should do is compile your code with the -Wall compiler flag and fix any warnings that occur. In particular, make sure that all function prototypes are in scope, because out-of-scope prototypes can hide many subtle portability problems.
At a high level, to make your code 64-bit clean, you must do the following:
Avoid assigning 64-bit long integers to 32-bit integers.
Avoid assigning 64-bit pointers to 32-bit integers.
Fix alignment issues caused by changes in data type sizes.
Avoid pointer and long integer truncation during arithmetic operations.
General Programming Tips
Data Type and Alignment Tips
Avoiding Pointer-to-Integer Conversion
Working with Bits and Bitmasks
Tools Tips
Alignment Pragmas
Sign Extension Rules for C and C-derived Languages
Velocity Engine and SSE Alignment Tips
Porting Assembly Language Code
Last updated: 2008-04-08