diff options
Diffstat (limited to 'src/port/stdint.h')
-rw-r--r-- | src/port/stdint.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/port/stdint.h b/src/port/stdint.h index 345ec7e..ec4f0ce 100644 --- a/src/port/stdint.h +++ b/src/port/stdint.h @@ -3,13 +3,29 @@ #include "port/sys.h" -#if defined HAVE_STDINT_H -#include <stdint.h> -#endif /* defined HAVE_STDINT_H */ +/* for uintptr_t and snprintf placeholder PRIdPTR (FIXME: + * needs a lot of improvement!) + */ +#if defined SUNOS + +#if OS_MAJOR_VERSION == 5 -/* Solaris 8 weirdness */ -#if defined HAVE_LINK_H -#include <link.h> -#endif /* defined HAVE_LINK_H */ +#if OS_MINOR_VERSION == 8 +#include <sys/int_types.h> +/* FIXME: this may depend on 32/64-bit version of Solaris 8! */ +#define PRIdPTR "d" +typedef unsigned long long uint64_t; +#else +#include <inttypes.h> +#include <stdint.h> +#endif /* OS_MINOR_VERSION == 8 */ +#else +#include <inttypes.h> +#include <stdint.h> +#endif /* OS_MAJOR_VERSION == 5 */ +#else +#include <inttypes.h> +#include <stdint.h> +#endif /* defined SUNOS */ #endif /* ifndef __STDINT_H */ |