From 37835d905637553e33f09ed56ef1975e0e5aeef3 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 27 Nov 2009 22:00:39 +0000 Subject: atomic operations test-run --- auto/lib/libatomic/conf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'auto/lib') diff --git a/auto/lib/libatomic/conf b/auto/lib/libatomic/conf index a06ab1a88..214feb37a 100644 --- a/auto/lib/libatomic/conf +++ b/auto/lib/libatomic/conf @@ -13,15 +13,18 @@ else ngx_feature="atomic_ops library" ngx_feature_name=NGX_HAVE_LIBATOMIC - ngx_feature_run=no + ngx_feature_run=yes ngx_feature_incs="#include " ngx_feature_path= ngx_feature_libs="-latomic_ops" - ngx_feature_test="AO_t *n; - AO_compare_and_swap(n, 0, 1); - AO_fetch_and_add(n, 1); + ngx_feature_test="long n = 0; + if (!AO_compare_and_swap(&n, 0, 1)) + return 1; + if (AO_fetch_and_add(&n, 1) != 1) + return 1; + if (n != 2) + return 1; AO_nop();" - . auto/feature if [ $ngx_found = yes ]; then -- cgit