A single set of system headers supports both 32-bit and 64-bit compilation environments. You do not need to specify a different include path for the 64-bit compilation environment.
To better understand the changes made to the headers for support of the 64-bit environment, you should understand the various definitions in the header <sys/isa_defs.h>. This header contains a group of well known #defines and sets these for each instruction set architecture. Inclusion of <sys/types.h> automatically includes <sys/isa_defs.h>.
The symbols in the following table are defined by the compilation environment:
__sparc | Indicates any of the SPARC family of processor architectures. This includes SPARC V7, SPARC V8, and SPARC V9 architectures. The symbol sparc is a deprecated historical synonym for __sparc. |
__sparcv8 | Indicates the 32-bit SPARC V8 architecture as defined by Version 8 of the SPARC Architecture Manual. |
__sparcv9 | Indicates the 64-bit SPARC V9 architecture as defined by Version 9 of the SPARC Architecture Manual. |
__i386 | This symbol is generic for all processors implementing the Intel 386 instruction set or a superset of it. This includes all members of the 386, 486, and Pentium family of processors. |
The symbols __sparcv8 and __sparcv9 are mutually exclusive and are only relevant when the symbol __sparc is defined.
The following symbols are derived from some combination of the symbols above being defined:
_ILP32 | The data model where sizes of int, long, and pointer are all 32 bits. |
_LP64 | The data model where sizes of long and pointer are all 64 bits. |
Likewise, the symbols _ILP32 and _LP64 are also mutually exclusive, though they are not specific to SPARC machines.
If writing completely portable code is not possible, and specific 32-bit versus 64-bit code are required, make the code conditional using _ILP32 or _LP64, rather than __sparcv8 or __sparcv9. This makes the compilation-environment machine independent and maximizes the portability of the application to other 64-bit platforms.