diff --git a/configure.in b/configure.in index d4b01e238f63b7d9d04005606a81e9968ae48b16..5db4f034f0cb49e400e32538e5c7f6ce8df083d1 100644 --- a/configure.in +++ b/configure.in @@ -1922,9 +1922,9 @@ AC_CACHE_CHECK([whether the OS provides atomic_* functions like Solaris], [mysql_cv_solaris_atomic], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( - [ + [[ #include <atomic.h> - ] + ]], [[ int foo = -10; int bar = 10; int64_t foo64 = -10; int64_t bar64 = 10; @@ -1944,9 +1944,7 @@ AC_CACHE_CHECK([whether the OS provides atomic_* functions like Solaris], bar64 = atomic_cas_64((volatile uint64_t *)&bar64, (uint_t)foo64, 15); if (bar64) return -1; - foo64 = atomic_or_64((volatile uint64_t *)&bar64, 0); - if (foo64) - return -1; + atomic_or_64((volatile uint64_t *)&bar64, 0); return 0; ]] )], diff --git a/include/atomic/nolock.h b/include/atomic/nolock.h index e4cd9ab9896723f5e37713be16e5f162b17f06e5..b2eaea34095b5fb5545ed6bbe1517d76c887f0b8 100644 --- a/include/atomic/nolock.h +++ b/include/atomic/nolock.h @@ -17,7 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if defined(__i386__) || defined(_MSC_VER) || defined(__x86_64__) \ - || defined(HAVE_GCC_ATOMIC_BUILTINS) + || defined(HAVE_GCC_ATOMIC_BUILTINS) \ + || defined(HAVE_SOLARIS_ATOMIC) # ifdef MY_ATOMIC_MODE_DUMMY # define LOCK_prefix ""