maintain 32bit and 64bit C code

Hi,

I have a C code which builds and works fine on 32bit linux machine.
Now i want to convert that code to build and run on 64 bit linux machine. I dont want to maintain two separate sources for 32 and 64 bit build. Same source should get build on 32 as well as 64 bit machine (when a corresponding build option is specified).

Please guide me how i can achieve this?

-Bhushan

A good starting place is: Converting 32-bit Applications Into 64-bit Applications: Things to Consider

Another good article to read is 64bit and Data Size Neutrality

Thanks,

It has really good information to get started with.

-Bhushan