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

Missing pthread_mutex_consistent() #147

Merged
merged 5 commits into from
Sep 9, 2013
Merged

Missing pthread_mutex_consistent() #147

merged 5 commits into from
Sep 9, 2013

Conversation

kspangsege
Copy link
Contributor

See the added FIXME for details.

@finnschiermer

@ghost ghost assigned finnschiermer Sep 4, 2013
@finnschiermer
Copy link
Contributor

pthread_mutex_consistent was added to glibc ver 2.12 - I'll add a check based on glibc version defines.

@@ -2,17 +2,31 @@

#include <tightdb/exceptions.hpp>
#include <tightdb/thread.hpp>
#include <features.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, <features.h> is not a standard header, nor is it required by POSIX. Consider Windows and Mac. On Linux, it will be included via <unistd.h>, which is already included below, so no explicit include seems to be required.

We must strive for a minimum level of portability where we require only that the platform is either POSIX or Windows. Of course, an even higher level of portability is welcome if it can be provided. Note that <unistd.h> is required by POSIX.

@kspangsege
Copy link
Contributor Author

👍 (except for the problematic include)

@kspangsege
Copy link
Contributor Author

I don't know if you know it already, but after

sudo apt-get install manpages-posix-dev

you can do man unistd.h, for example.

finnschiermer pushed a commit that referenced this pull request Sep 9, 2013
…istent

Handle missing pthread_mutex_consistent() in glibc versions prior to 2.12
@finnschiermer finnschiermer merged commit 25159c8 into realm:master Sep 9, 2013
@kspangsege kspangsege deleted the ks-missing-pthread_mutex_consistent branch September 9, 2013 13:12
tgoyne pushed a commit that referenced this pull request Jul 11, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants