|
|
@ -28,15 +28,17 @@ dnl **************************************
|
|
|
|
dnl ***** tests for compiler built-ins *****
|
|
|
|
dnl ***** tests for compiler built-ins *****
|
|
|
|
dnl **************************************
|
|
|
|
dnl **************************************
|
|
|
|
|
|
|
|
|
|
|
|
AC_CACHE_CHECK([for __sync_bool_compare_and_swap_8],
|
|
|
|
AC_CACHE_CHECK(
|
|
|
|
|
|
|
|
[for __sync_bool_compare_and_swap_8],
|
|
|
|
[ctrie_cv_func___sync_bool_compare_and_swap_8],
|
|
|
|
[ctrie_cv_func___sync_bool_compare_and_swap_8],
|
|
|
|
[AC_LINK_IFELSE([
|
|
|
|
[AC_LINK_IFELSE([AC_LANG_SOURCE([
|
|
|
|
typedef unsigned int uint64 __attribute__ ((mode (DI)));
|
|
|
|
typedef unsigned int uint64 __attribute__ ((mode (DI)));
|
|
|
|
uint64 i;
|
|
|
|
uint64 i;
|
|
|
|
int main() { return __sync_bool_compare_and_swap (&i, 0, 1); }
|
|
|
|
int main() { return __sync_bool_compare_and_swap (&i, 0, 1); }
|
|
|
|
],
|
|
|
|
])],
|
|
|
|
[ctrie_cv_func___sync_bool_compare_and_swap_8=yes],
|
|
|
|
[ctrie_cv_func___sync_bool_compare_and_swap_8=yes],
|
|
|
|
[ctrie_cv_func___sync_bool_compare_and_swap_8=no])])
|
|
|
|
[ctrie_cv_func___sync_bool_compare_and_swap_8=no])])
|
|
|
|
|
|
|
|
|
|
|
|
if test "$ctrie_cv_func___sync_bool_compare_and_swap_8" = "yes"; then
|
|
|
|
if test "$ctrie_cv_func___sync_bool_compare_and_swap_8" = "yes"; then
|
|
|
|
AC_DEFINE([HAVE__SYNC_BOOL_COMPARE_AND_SWAP_8], 1,
|
|
|
|
AC_DEFINE([HAVE__SYNC_BOOL_COMPARE_AND_SWAP_8], 1,
|
|
|
|
[Define to 1 if the compiler provides the __sync_bool_compare_and_swap function for uint64])
|
|
|
|
[Define to 1 if the compiler provides the __sync_bool_compare_and_swap function for uint64])
|
|
|
|