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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snaiffer
Copy link

@snaiffer snaiffer commented Jul 4, 2024

I've tested it on SunOS 5.11.3 with gcc (GCC) 13.1.0

Copy link
Member

@vadz vadz left a 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!

Comment on lines +47 to +48
#if SOCI_OS != SOCI_OS_SUN
// As in SunOS: typedef char int8_t;
Copy link
Member

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
Copy link
Member

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?

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants