Comment the machine dependence in the headers of the appropriate files. Assume that the compiler or hardware does it some completely screwy way. Pay attention to word sizes. Objects may be non-intuitive sizes, Pointers are not always the same size as int s, the same size as each other, or freely interconvertible. The following table shows bit sizes for basic types in C for various machines and compilers.
Some machines have more than one possible size for a given type.
The size you get can depend both on the compiler and on various compile-time flags. Unsigned numbers are the same bit size as signed numbers. Use these types when you need a generic pointer. Be sure to cast pointers back to the correct type before using them. The Cray-2 may use 64 bits to store an int , but a long cast into an int and back to a long may be truncated to 32 bits.