diff --git a/include/soci/exchange-traits.h b/include/soci/exchange-traits.h index 068571daf..7d9776c92 100644 --- a/include/soci/exchange-traits.h +++ b/include/soci/exchange-traits.h @@ -44,12 +44,15 @@ struct exchange_traits }; }; +#if SOCI_OS != SOCI_OS_SUN +// As in SunOS: typedef char int8_t; template <> struct exchange_traits { typedef basic_type_tag type_family; enum { x_type = x_int8 }; }; +#endif template <> struct exchange_traits diff --git a/include/soci/soci-platform.h b/include/soci/soci-platform.h index bb2b8eeff..a442c16b3 100644 --- a/include/soci/soci-platform.h +++ b/include/soci/soci-platform.h @@ -179,6 +179,7 @@ private: \ #define SOCI_OS_FREE_BSD 0x0002 #define SOCI_OS_APPLE 0x0003 #define SOCI_OS_WINDOWS 0x0004 +#define SOCI_OS_SUN 0x0005 #if defined(linux) || defined(__linux) || defined(__linux__) #define SOCI_OS SOCI_OS_LINUX @@ -188,6 +189,8 @@ private: \ #define SOCI_OS SOCI_OS_APPLE #elif defined(_WIN32) || defined(_WIN64) #define SOCI_OS SOCI_OS_WINDOWS +#elif defined(sun) || defined(__sun) || defined(__sun__) + #define SOCI_OS SOCI_OS_SUN #endif #if !defined(SOCI_OS) diff --git a/include/soci/soci-types.h b/include/soci/soci-types.h index be94bc3c8..5494f9fbe 100644 --- a/include/soci/soci-types.h +++ b/include/soci/soci-types.h @@ -6,7 +6,7 @@ #if defined(__GNUC__) || defined(__clang__) #if defined(__LP64__) #define SOCI_LONG_IS_64_BIT 1 - #if SOCI_OS == SOCI_OS_LINUX || SOCI_OS == SOCI_OS_FREE_BSD + #if SOCI_OS == SOCI_OS_LINUX || SOCI_OS == SOCI_OS_FREE_BSD || SOCI_OS == SOCI_OS_SUN #define SOCI_INT64_IS_LONG 1 #endif #endif