On 09.03.2012 15:53, Daniel Shahaf wrote:
[email protected] wrote on Thu, Mar 08, 2012 at 20:07:43 -0000:
Author: stefan2
Date: Thu Mar 8 20:07:43 2012
New Revision: 1298554
URL: http://svn.apache.org/viewvc?rev=1298554&view=rev
Log:
Teach subversion to detect the availability of GCC's atomic built-ins
for 64 bit items. This code was taken from APR and tweaked slightly.
* build/ac-macros/svn-macros.m4
(SVN_CHECK_FOR_ATOMIC_BUILTINS): new macro
* configure.ac
call the new macro, set SVN_HAS_ATOMIC_BUILTINS #define
Modified:
subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4
subversion/branches/revprop-cache/configure.ac
Modified: subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4
URL:
http://svn.apache.org/viewvc/subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4?rev=1298554&r1=1298553&r2=1298554&view=diff
==============================================================================
--- subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4 (original)
+++ subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4 Thu Mar 8
20:07:43 2012
@@ -202,3 +202,44 @@ AC_DEFUN([SVN_REMOVE_STANDARD_LIB_DIRS],
printf "%s" "${output_flags# }"
fi
])
+
+AC_DEFUN([SVN_CHECK_FOR_ATOMIC_BUILTINS],
+[
+ AC_CACHE_CHECK([whether the compiler provides atomic builtins],
[ap_cv_atomic_builtins],
+ [AC_TRY_RUN([
+ int main()
+ {
...
+ }], [ap_cv_atomic_builtins=yes], [ap_cv_atomic_builtins=no],
[ap_cv_atomic_builtins=no])])
Mostly a nitpick, but this configure variable is in httpd's namespace
(ap_*), not svn's --- so in principle, we should rename the variable to
the svn_* namespace.
Daniel
(Yes, it's not a problem for the majority of downstream consumers.
Agreed. But raising it, partially due to similar issues being raised
on other ASF lists recently.)
Thanks for noticing - I've not been aware of the
namespace issue. I simply took the code from
APR, it worked and that was fine with me ;)
Fixed in r1298982.
-- Stefan^2.