diff options
author | gabor@google.com <gabor@google.com@62dab493-f737-651d-591e-8d6aee1b9529> | 2011-07-19 23:36:47 +0000 |
---|---|---|
committer | gabor@google.com <gabor@google.com@62dab493-f737-651d-591e-8d6aee1b9529> | 2011-07-19 23:36:47 +0000 |
commit | 6872ace90110799f87402cbc594c4cbf1bc474c7 (patch) | |
tree | e6292e5ec9404ddab7c1de7b7272927161b06232 /port | |
parent | 6699c7ebe68fba9673ea7a78b54e0eb558102301 (diff) | |
download | leveldb-6872ace90110799f87402cbc594c4cbf1bc474c7.tar.gz |
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
Diffstat (limited to 'port')
-rw-r--r-- | port/atomic_pointer.h | 5 |
1 files changed, 3 insertions, 2 deletions
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. |