Sha256: 59dbedae79268e66931ee61cb5d7a521e6d6339e1129b9120be85821f90211e1

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

dnl  Copyright (C) 2009 Sun Microsystems, Inc.
dnl This file is free software; Sun Microsystems, Inc.
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

#--------------------------------------------------------------------
# Check for GCC Atomic Support
#--------------------------------------------------------------------


AC_DEFUN([PANDORA_HAVE_GCC_ATOMICS],[
	
  AC_CACHE_CHECK(
    [whether the compiler provides atomic builtins],
    [ac_cv_gcc_atomic_builtins],
    [AC_LINK_IFELSE(
      [AC_LANG_PROGRAM([],[[
        int foo= -10; int bar= 10;
        if (!__sync_fetch_and_add(&foo, bar) || foo)
          return -1;
        bar= __sync_lock_test_and_set(&foo, bar);
        if (bar || foo != 10)
          return -1;
        bar= __sync_val_compare_and_swap(&bar, foo, 15);
        if (bar)
          return -1;
        return 0;
        ]])],
      [ac_cv_gcc_atomic_builtins=yes],
      [ac_cv_gcc_atomic_builtins=no])])

  AS_IF([test "x$ac_cv_gcc_atomic_builtins" = "xyes"],[
    AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
              [Define to 1 if compiler provides atomic builtins.])
  ])

])

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
couchbase-memcached-1.2.9 ext/libmemcached-0.50/m4/pandora_have_gcc_atomics.m4
couchbase-memcached-1.2.8 ext/libmemcached-0.50/m4/pandora_have_gcc_atomics.m4