Joerg Schilling wrote: > "Garrett D'Amore" <garrett_damore at tadpole.com> wrote: > > >> Huh? sys/isa_defs.h should come in via sys/types.h. If you're not >> getting sys/types.h, then all bets are off. >> >> isa_defs.h gets the _LP64 by looking at __amd64 or __sparcv9. You could >> use the same tests, but I would discourage you from doing so. >> > > Why? >
Its not as portable as just including sys/types.h. It will need to be updated when a new processor type is added (ala Polaris or a MIPS port). sys/types.h is the portable way to get this. If you can't include sys/types.h, then I suspect you're doing something wrong. (You should be able to get this header _very_ early, even if you don't include any others.) However, those tests will work, and if you're happy with the limitations of them, then go ahead. Code integrating in ON should not need to do this though, especially since it creates a new opportunity for breakage when a new port is added. -- Garrett -- Garrett D'Amore, Principal Software Engineer Tadpole Computer / Computing Technologies Division, General Dynamics C4 Systems http://www.tadpolecomputer.com/ Phone: 951 325-2134 Fax: 951 325-2191