diff --git a/build_detect_platform b/build_detect_platform index adbeaf16..884a158d 100755 --- a/build_detect_platform +++ b/build_detect_platform @@ -156,11 +156,11 @@ if [ "$CROSS_COMPILE" = "true" ]; then else # If -std=c++0x works, use . Otherwise use port_posix.h. $CXX $CFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null < + #include int main() {} EOF if [ "$?" = 0 ]; then - COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX -DLEVELDB_CSTDATOMIC_PRESENT" + COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX -DLEVELDB_ATOMIC_PRESENT" PLATFORM_CXXFLAGS="-std=c++0x" else COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX" diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h index 2b485c7f..18bd5bee 100644 --- a/port/atomic_pointer.h +++ b/port/atomic_pointer.h @@ -20,9 +20,9 @@ #define PORT_ATOMIC_POINTER_H_ #include -//#ifdef LEVELDB_CSTDATOMIC_PRESENT -//#include ... moved below -//#endif +#ifdef LEVELDB_ATOMIC_PRESENT +#include +#endif #ifdef OS_WIN #include #endif @@ -114,9 +114,8 @@ class AtomicPointer { } }; -// AtomicPointer based on -#elif defined(LEVELDB_CSTDATOMIC_PRESENT) -#include +// AtomicPointer based on +#elif defined(LEVELDB_ATOMIC_PRESENT) class AtomicPointer { private: