Created
June 3, 2013 19:12
-
-
Save danieldk/5700533 to your computer and use it in GitHub Desktop.
Berkeley DB 4.8 patch for compilers that have __atomic_compare_exchange.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary files dbxml-2.5.16.orig/db-4.8.26/dbinc/.atomic.h.un~ and dbxml-2.5.16/db-4.8.26/dbinc/.atomic.h.un~ differ | |
diff -ruN dbxml-2.5.16.orig/db-4.8.26/dbinc/atomic.h dbxml-2.5.16/db-4.8.26/dbinc/atomic.h | |
--- dbxml-2.5.16.orig/db-4.8.26/dbinc/atomic.h 2013-06-03 21:04:07.000000000 +0200 | |
+++ dbxml-2.5.16/db-4.8.26/dbinc/atomic.h 2013-06-03 21:10:53.000000000 +0200 | |
@@ -144,7 +144,7 @@ | |
#define atomic_inc(env, p) __atomic_inc(p) | |
#define atomic_dec(env, p) __atomic_dec(p) | |
#define atomic_compare_exchange(env, p, o, n) \ | |
- __atomic_compare_exchange((p), (o), (n)) | |
+ __atomic_compare_exchange_db((p), (o), (n)) | |
static inline int __atomic_inc(db_atomic_t *p) | |
{ | |
int temp; | |
@@ -176,7 +176,7 @@ | |
* http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html | |
* which configure could be changed to use. | |
*/ | |
-static inline int __atomic_compare_exchange( | |
+static inline int __atomic_compare_exchange_db( | |
db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) | |
{ | |
atomic_value_t was; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks.Just adding a _db at the end of the function name like what @jmjatlanta said,it works.