I am trying to build a package (libnet) in Solaris and I found that in Solaris there are no u_xxx_t but uxxx_t defined in sys/types.h
I had 2 questions:
1-Shouldn’t autotools take care of this for me?
2-I guess I’m not the first one facing this (although google was little help) is there a standard/eficient/correct/quick way of overcoming this?
The most reasonable way of overcoming tis is to stick with the standard spelling of the type names (even if that standard is a “future” one for the implementation you are using). C99 introduced a standard nomenclature for such type names and in C99 it is
uint8_t. So, even if you are using a C89/90 compiler I’d suggest you useuint8_tin your code. If on some platform it is unavailable or spelled differently, you simply introduce a platform-specific typedef name that “converts” the spellingFor this to work you’ll need a header file that is included into every translation unit. Normally, each project has one created specifically for solving issues like this one.