Fix the configure-check again: must use b.

Otherwise, when compiling with optimisation, the compiler will detect
that b was unused, then use the instructions that i386 supports.
This commit is contained in:
Thiago Macieira 2009-07-25 13:21:01 +02:00
parent 24f55fa8cc
commit 3c99e692c9

View file

@ -355,7 +355,7 @@ fi
AC_CACHE_CHECK([whether $CC knows __sync_sub_and_fetch()],
dbus_cv_sync_sub_and_fetch,
[AC_LINK_IFELSE(
AC_LANG_PROGRAM([], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4);]]),
AC_LANG_PROGRAM([], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4); exit(b); ]]),
[dbus_cv_sync_sub_and_fetch=yes],
[dbus_cv_sync_sub_and_fetch=no])
])