Permalink
Browse files

backport patch #4231 which was left behind due to a mis-git-undertanding

  • Loading branch information...
1 parent 4352a27 commit 6d2fe7de10b0c17204df1785737b3dcbf475d972 @unicolet unicolet committed Nov 28, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 configure
  2. +1 −1 configure.in
View
@@ -17836,7 +17836,7 @@ else
int
main ()
{
-int x;__sync_fetch_and_add(&x,1);
+long x;long y=__sync_fetch_and_add(&x,1);
;
return 0;
}
View
@@ -851,7 +851,7 @@ dnl ---------------------------------------------------------------------
dnl Check for the __sync_fetch_and_add builtin
dnl ---------------------------------------------------------------------
AC_CACHE_CHECK([for __sync_fetch_and_add], ac_cv_func_sync_fetch_and_add,
-[AC_TRY_LINK([],[int x;__sync_fetch_and_add(&x,1);],ac_cv_func_sync_fetch_and_add=yes,ac_cv_func_sync_fetch_and_add=no)])
+[AC_TRY_LINK([],[long x;long y=__sync_fetch_and_add(&x,1);],ac_cv_func_sync_fetch_and_add=yes,ac_cv_func_sync_fetch_and_add=no)])
if test "$ac_cv_func_sync_fetch_and_add" = yes; then
ALL_ENABLED="-DHAVE_SYNC_FETCH_AND_ADD $ALL_ENABLED"
AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD,1,[Define if you have the __sync_fetch_and_add function])

0 comments on commit 6d2fe7d

Please sign in to comment.