Backport Win32 LevelDB env from C++0x to C++
Since the gitian mingw compiler doesn't support C++0x yet.
This commit is contained in:
@@ -134,7 +134,7 @@ AtomicPointer::AtomicPointer(void* v) {
|
||||
}
|
||||
|
||||
void* AtomicPointer::Acquire_Load() const {
|
||||
void * p = nullptr;
|
||||
void * p = NULL;
|
||||
InterlockedExchangePointer(&p, rep_);
|
||||
return p;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ enum InitializationState
|
||||
|
||||
void InitOnce(OnceType* once, void (*initializer)()) {
|
||||
|
||||
static_assert(Uninitialized == LEVELDB_ONCE_INIT, "Invalid uninitialized state value");
|
||||
assert(Uninitialized == LEVELDB_ONCE_INIT);
|
||||
|
||||
InitializationState state = static_cast<InitializationState>(InterlockedCompareExchange(once, Running, Uninitialized));
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ class AtomicPointer {
|
||||
private:
|
||||
void * rep_;
|
||||
public:
|
||||
AtomicPointer() : rep_(nullptr) { }
|
||||
AtomicPointer() : rep_(NULL) { }
|
||||
explicit AtomicPointer(void* v);
|
||||
void* Acquire_Load() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user