------------------------------------------------------------ revno: 12603 revision-id: squid3@treenet.co.nz-20130908220521-ml7j5notql4veufq parent: squid3@treenet.co.nz-20130726124339-q1htcokoidza95pa committer: Amos Jeffries branch nick: 3.3 timestamp: Sun 2013-09-08 16:05:21 -0600 message: Windows: fix detection of GNU atomic operations On MinGW the GNU atomic operations symbols are defined but do not work. We require a run-time test to detect problems. Not just a compiler check. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130908220521-ml7j5notql4veufq # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: b3480fbb806ee064dd71e190c03500a44dd85037 # timestamp: 2013-09-08 22:53:31 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20130726124339-\ # q1htcokoidza95pa # # Begin patch === modified file 'configure.ac' --- configure.ac 2013-07-13 13:24:45 +0000 +++ configure.ac 2013-09-08 22:05:21 +0000 @@ -391,8 +391,8 @@ dnl dnl Check for atomic operations support in the compiler dnl -AC_MSG_CHECKING([for atomic operations support]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +AC_MSG_CHECKING([for GNU atomic operations support]) +AC_RUN_IFELSE([AC_LANG_PROGRAM([[ int n = 0; ]],[[ __sync_add_and_fetch(&n, 10); // n becomes 10 @@ -403,8 +403,7 @@ return (n == 200) ? 0 : -1; ]])], [ - AC_DEFINE(HAVE_ATOMIC_OPS,1, - [Define to 1 if you have __sync_add_and_fetch() and such]) + AC_DEFINE(HAVE_ATOMIC_OPS,1,[Define to 1 if you have __sync_add_and_fetch() and such]) AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no)