]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Fix the configure-check again: must use b.
authorThiago Macieira <thiago@kde.org>
Sat, 25 Jul 2009 11:21:01 +0000 (13:21 +0200)
committerThiago Macieira <thiago@kde.org>
Sat, 25 Jul 2009 11:21:01 +0000 (13:21 +0200)
Otherwise, when compiling with optimisation, the compiler will detect
that b was unused, then use the instructions that i386 supports.

configure.in

index f40558673e9ba9f72b6ceca0de1e1381c8e09cb4..d79d6559988b9db9deb06c02e5909b328a47d46d 100644 (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])
   ])