Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building on SunOS with gcc #1154

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/soci/exchange-traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,15 @@ struct exchange_traits
};
};

#if SOCI_OS != SOCI_OS_SUN
// As in SunOS: typedef char int8_t;
vadz marked this conversation as resolved.
Show resolved Hide resolved
template <>
struct exchange_traits<int8_t>
{
typedef basic_type_tag type_family;
enum { x_type = x_int8 };
};
#endif

template <>
struct exchange_traits<uint8_t>
Expand Down
3 changes: 3 additions & 0 deletions include/soci/soci-platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion include/soci/soci-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
vadz marked this conversation as resolved.
Show resolved Hide resolved
#define SOCI_INT64_IS_LONG 1
#endif
#endif
Expand Down
Loading