]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix configure check for gcc atomics on 32-bit x86.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 4 Oct 2013 18:29:08 +0000 (11:29 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 4 Oct 2013 18:29:08 +0000 (11:29 -0700)
build/aclocal/atomic_builtins.m4
configure

index 8366eb3ef4b2d6542c8b19cdfc34673bb567ce98..eac5d3336a78f28874bc6aad51d7974ecf07bbb8 100644 (file)
@@ -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)
index 7697a87f25f424576c012220b5dc250f20a8794e..c922d7ee611437b25b6cf174c77c14c98c5f835b 100755 (executable)
--- 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;