From: Jay Freeman (saurik) Date: Fri, 4 Oct 2013 18:29:08 +0000 (-0700) Subject: Fix configure check for gcc atomics on 32-bit x86. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/eadae5b9fdfad7d88b86c8260c74b158203ad299 Fix configure check for gcc atomics on 32-bit x86. --- 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;