From 6872ace90110799f87402cbc594c4cbf1bc474c7 Mon Sep 17 00:00:00 2001 From: "gabor@google.com" Date: Tue, 19 Jul 2011 23:36:47 +0000 Subject: Sun Studio support, and fix for test related memory fixes. - LevelDB patch for Sun Studio Based on a patch submitted by Theo Schlossnagle - thanks! This fixes Issue 17. - Fix a couple of test related memory leaks. git-svn-id: https://leveldb.googlecode.com/svn/trunk@38 62dab493-f737-651d-591e-8d6aee1b9529 --- port/atomic_pointer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'port') diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h index 7659840..c618778 100644 --- a/port/atomic_pointer.h +++ b/port/atomic_pointer.h @@ -48,8 +48,9 @@ namespace port { // http://msdn.microsoft.com/en-us/library/ms684208(v=vs.85).aspx #define LEVELDB_HAVE_MEMORY_BARRIER -// Gcc on x86 -#elif defined(__GNUC__) && defined(ARCH_CPU_X86_FAMILY) +// Gcc and Sun Studio on x86 +#elif defined(ARCH_CPU_X86_FAMILY) && \ + (defined(__GNUC__) || defined(__SUNPRO_CC)) inline void MemoryBarrier() { // See http://gcc.gnu.org/ml/gcc/2003-04/msg01180.html for a discussion on // this idiom. Also see http://en.wikipedia.org/wiki/Memory_ordering. -- cgit v1.2.1