From eadae5b9fdfad7d88b86c8260c74b158203ad299 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 4 Oct 2013 11:29:08 -0700 Subject: [PATCH] Fix configure check for gcc atomics on 32-bit x86. --- build/aclocal/atomic_builtins.m4 | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/aclocal/atomic_builtins.m4 b/build/aclocal/atomic_builtins.m4 index 8366eb3ef4..eac5d3336a 100644 --- a/build/aclocal/atomic_builtins.m4 +++ b/build/aclocal/atomic_builtins.m4 @@ -16,7 +16,7 @@ AC_DEFUN([WX_ATOMIC_BUILTINS], __sync_fetch_and_add(&value, 2); __sync_sub_and_fetch(&value, 1); /* but wxAtomicDec does, so mimic that: */ - unsigned int r2 = __sync_sub_and_fetch(&value, 1); + volatile unsigned int r2 = __sync_sub_and_fetch(&value, 1); ], wx_cv_cc_gcc_atomic_builtins=yes, wx_cv_cc_gcc_atomic_builtins=no) diff --git a/configure b/configure index 7697a87f25..c922d7ee61 100755 --- a/configure +++ b/configure @@ -21867,7 +21867,7 @@ main () __sync_fetch_and_add(&value, 2); __sync_sub_and_fetch(&value, 1); /* but wxAtomicDec does, so mimic that: */ - unsigned int r2 = __sync_sub_and_fetch(&value, 1); + volatile unsigned int r2 = __sync_sub_and_fetch(&value, 1); ; return 0; -- 2.45.2