add the same test as commit:764bfdcb9f for __gnu_cxx::__exchange_and_add

refs #8
This commit is contained in:
Nobuyuki Kubota 2013-04-09 18:14:23 -07:00
parent f8c4125892
commit f07950c60a

View File

@ -65,7 +65,7 @@ add CFLAGS="-march=i686" and CXXFLAGS="-march=i686" options to ./configure as fo
#include <bits/atomicity.h> #include <bits/atomicity.h>
int atomic_sub(int i) { return __gnu_cxx::__exchange_and_add(&i, -1) - 1; } int atomic_sub(int i) { return __gnu_cxx::__exchange_and_add(&i, -1) - 1; }
int atomic_add(int i) { return __gnu_cxx::__exchange_and_add(&i, 1) + 1; } int atomic_add(int i) { return __gnu_cxx::__exchange_and_add(&i, 1) + 1; }
], [], msgpack_cv_gcc_cxx_atomic_ops="yes") ], [atomic_sub(1); atomic_add(1);], msgpack_cv_gcc_cxx_atomic_ops="yes")
]) ])
AC_LANG_POP([C++]) AC_LANG_POP([C++])