From: Thiago Macieira Date: Thu, 16 Jul 2009 13:17:25 +0000 (+0200) Subject: Fix detection of the GCC __sync intrinsics. X-Git-Tag: dbus-1.3.0~4^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f06daccce3f4e75cfac7c97bfb1743affb55cb2;p=thirdparty%2Fdbus.git Fix detection of the GCC __sync intrinsics. We have to use the return value, otherwise GCC optimises the code by using instructions that don't return anything. That won't match what we actually use in dbus-sysdeps-unix.c --- diff --git a/configure.in b/configure.in index 036679cec..2a0e64e26 100644 --- a/configure.in +++ b/configure.in @@ -595,7 +595,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; __sync_sub_and_fetch(&a, 4);]]), + AC_LANG_PROGRAM([], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4);]]), [dbus_cv_sync_sub_and_fetch=yes], [dbus_cv_sync_sub_and_fetch=no]) ])