-
Notifications
You must be signed in to change notification settings - Fork 477
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix but I'd really prefer to have generic tests for the types instead of testing for the individual platforms. If you can update CMake to do it instead, this would be very welcome. TIA!
#if SOCI_OS != SOCI_OS_SUN | ||
// As in SunOS: typedef char int8_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a property of Solaris per se, we should almost certainly check whether char
and int8_t
are the same in CMake and define some SOCI_HAVE_INT8_T_TYPEDEF
or something like this and test for it here.
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too we should just check for the condition directly instead of testing for the platform... In fact, I really don't know why did we do it like this in the first place, @zann1x do you remember if there was some good reason for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there was any other reason for it than to just make it work both locally and in the CI pipeline. In the end, it's only important that we know which data type definitions the underlying OS uses.
I've tested it on SunOS 5.11.3 with gcc (GCC) 13.1.0