Use the following checklist to help you convert your code to 64-bit.
Review all data structures and interfaces to verify that these are still valid in the 64-bit environment.
Include <inttypes.h> in your code to pull in the _ILP32 or _LP64 definitions as well as many basic derived types. Systems programs may wish to include <sys/types.h>(or at a minimum, <sys/isa_defs.h>) to obtain the definitions of _ILP32 or _LP64.
Move function prototypes and external declarations with non-local scope to headers and include these headers in your code.
Run lint using the -errchk=longptr64 and signext options. Also, specify -D__sparcv9 for applications intended for SPARC architectures or specify -Xarch=amd64 for applications intended for x86 architectures. Review each warning individually. Keep in mind that not all warnings require a change to the code. Depending on the changes, run lint again in both 32-bit and 64-bit modes.
Compile code as both 32-bit and 64-bit, unless the application is being provided only as 64-bit.
Test the application by executing the 32-bit version on the 32-bit operating system, and the 64-bit version on the 64-bit operating system. You can also test the 32-bit version on the 64-bit operating system.