From 764bfdcb9ff455f4d8919fd38ab3d46a98f360e6 Mon Sep 17 00:00:00 2001 From: nori0428 Date: Fri, 1 Mar 2013 11:08:37 +0900 Subject: [PATCH] check whether exists __sync_{sub, add}_and_fetch --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 7e554297..3a79f257 100644 --- a/configure.in +++ b/configure.in @@ -47,7 +47,7 @@ AC_CACHE_CHECK([for __sync_* atomic operations], msgpack_cv_atomic_ops, [ AC_TRY_LINK([ int atomic_sub(int i) { return __sync_sub_and_fetch(&i, 1); } int atomic_add(int i) { return __sync_add_and_fetch(&i, 1); } - ], [], msgpack_cv_atomic_ops="yes") + ], [atomic_sub(1); atomic_add(1);], msgpack_cv_atomic_ops="yes") ]) if test "$msgpack_cv_atomic_ops" != "yes"; then if test "$enable_cxx" = "no"; then