support for building/running on OpenIndiana

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-03-23 13:28:22 +01:00
parent 7540ac8229
commit fcb6b935ea
18 changed files with 33 additions and 2 deletions

View file

@ -24,6 +24,10 @@
# define ddsrt_clang (0)
#endif
#ifdef __SUNPRO_C
# define __attribute__(x)
#endif
#if defined(__has_attribute)
# define ddsrt_has_attribute(params) __has_attribute(params)
#elif ddsrt_gnuc

View file

@ -32,6 +32,13 @@ extern "C" {
# elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# define DDSRT_ENDIAN DDSRT_LITTLE_ENDIAN
# endif
# elif defined(__sun)
# include <sys/isa_defs.h>
# if defined(_BIG_ENDIAN)
# define DDSRT_ENDIAN DDSRT_BIG_ENDIAN
# elif defined(_LITTLE_ENDIAN)
# define DDSRT_ENDIAN DDSRT_LITTLE_ENDIAN
# endif
# endif
#endif /* _WIN32 */