Joerg Schilling wrote: > "Garrett D'Amore" <garrett_damore at tadpole.com> wrote: > > >> 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.) >> > > Sorry, you are wrong: I cannot expect any such definition from any OS but > Solaris. >
I was making my comments in the context of Solaris. If you need to support other OS', then you have to figure out things separately, and indeed, this is the problem that tools like autoconf solves. For _Solaris_ (and more particularly ON), which is where the code in question is intended to reside, I would vastly prefer to avoid creating additional knowledge of processor-specific compilation environments outside of what exists in sys/types.h.