projects
/
platform
/
upstream
/
lmdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
943b23f
)
ITS#7969 Wrap unportable __sync_synchronize in #if
author
Hallvard Furuseth
<hallvard@openldap.org>
Fri, 3 Jul 2015 20:38:50 +0000
(22:38 +0200)
committer
Hallvard Furuseth
<hallvard@openldap.org>
Fri, 3 Jul 2015 20:38:50 +0000
(22:38 +0200)
libraries/liblmdb/mdb.c
patch
|
blob
|
history
diff --git
a/libraries/liblmdb/mdb.c
b/libraries/liblmdb/mdb.c
index
2d2486d
..
ae82bb2
100644
(file)
--- a/
libraries/liblmdb/mdb.c
+++ b/
libraries/liblmdb/mdb.c
@@
-3744,7
+3744,8
@@
mdb_env_write_meta(MDB_txn *txn)
mp->mm_dbs[0] = txn->mt_dbs[0];
mp->mm_dbs[1] = txn->mt_dbs[1];
mp->mm_last_pg = txn->mt_next_pgno - 1;
-#if !(defined(_MSC_VER) || defined(__i386__) || defined(__x86_64__))
+#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 404) && /* TODO: portability */ \
+ !(defined(__i386__) || defined(__x86_64__))
/* LY: issue a memory barrier, if not x86. ITS#7969 */
__sync_synchronize();
#endif