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

Fix OSMemoryBarrier deprecation warning on OS X #503

Closed
wants to merge 1 commit into from
Closed

Fix OSMemoryBarrier deprecation warning on OS X #503

wants to merge 1 commit into from

Conversation

byronyi
Copy link

@byronyi byronyi commented Aug 31, 2017

Remove deprecated OSMemoryBarrier in favour of an implementation based on std::atomic.

See the warning below on macOS 10.12:

In file included from ./port/port_posix.h:47:
./port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.

pwnall added a commit to pwnall/leveldb that referenced this pull request Mar 10, 2018
This is a stopgap for removing warnings on Mac builds, so -Werror can be
turned on. C++11 will be required in the nearby future, which guarantees
<atomic> support. Once that happens, the simplified version of this will
match google#503

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188553251
@pwnall
Copy link
Member

pwnall commented Mar 10, 2018

A variant of this was landed in 594cc98. Thank you very much for your contribution!

@pwnall pwnall closed this Mar 10, 2018
maochongxin pushed a commit to maochongxin/leveldb that referenced this pull request Jul 21, 2022
For people who get this library via CMake's AddExternalProject like me.
Would like a long term tutorial from someone who really understands CMake on how to actually link an externalproject's dependencies to another added external project.
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.

None yet

2 participants