Package: leveldb / 1.17-1

1002-cstdatomic_renaming.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: cstdatomic has been renamed to atomic, fix #include statements.
Bug: http://code.google.com/p/leveldb/issues/detail?id=3
---
 build_detect_platform |    2 +-
 port/atomic_pointer.h |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- leveldb.orig/build_detect_platform
+++ leveldb/build_detect_platform
@@ -185,7 +185,7 @@ else
 
     # If -std=c++0x works, use <cstdatomic>.  Otherwise use port_posix.h.
     $CXX $CXXFLAGS -std=c++0x -x c++ - -o $CXXOUTPUT 2>/dev/null  <<EOF
-      #include <cstdatomic>
+      #include <atomic>
       int main() {}
 EOF
     if [ "$?" = 0 ]; then
--- leveldb.orig/port/atomic_pointer.h
+++ leveldb/port/atomic_pointer.h
@@ -21,7 +21,7 @@
 
 #include <stdint.h>
 #ifdef LEVELDB_CSTDATOMIC_PRESENT
-#include <cstdatomic>
+#include <atomic>
 #endif
 #ifdef OS_WIN
 #include <windows.h>
@@ -205,10 +205,10 @@ inline void WriteMemoryBarrier() {
 #elif defined(ARCH_CPU_PARISC_FAMILY)
 
 inline void ReadMemoryBarrier() {
-  __asm__ __volatile__("" : : : "memory")
+  __asm__ __volatile__("" : : : "memory");
 }
 inline void WriteMemoryBarrier() {
-  __asm__ __volatile__("" : : : "memory")
+  __asm__ __volatile__("" : : : "memory");
 }
 #define LEVELDB_HAVE_MEMORY_BARRIER