diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-08-10 17:34:51 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-08-10 17:34:51 -0400 |
commit | 7e0add386184ef7aa599e5b3a96f16a57fa53566 (patch) | |
tree | c65b4b8760279c2a7db456f24a51b86074904aaa | |
parent | 7371ab74feb7a6bcb8cab0ae4e1f7753460b703d (diff) | |
download | postgresql-7e0add386184ef7aa599e5b3a96f16a57fa53566.tar.gz postgresql-7e0add386184ef7aa599e5b3a96f16a57fa53566.zip |
Accept alternate spellings of __sparcv7 and __sparcv8.
Apparently some versions of gcc prefer __sparc_v7__ and __sparc_v8__.
Per report from Waldemar Brodkorb.
-rw-r--r-- | src/include/storage/s_lock.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index c1d2ed59740..b5096e40431 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -420,12 +420,12 @@ tas(volatile slock_t *lock) : "=r"(_res), "+m"(*lock) : "r"(lock) : "memory"); -#if defined(__sparcv7) +#if defined(__sparcv7) || defined(__sparc_v7__) /* * No stbar or membar available, luckily no actually produced hardware * requires a barrier. */ -#elif defined(__sparcv8) +#elif defined(__sparcv8) || defined(__sparc_v8__) /* stbar is available (and required for both PSO, RMO), membar isn't */ __asm__ __volatile__ ("stbar \n":::"memory"); #else @@ -438,13 +438,13 @@ tas(volatile slock_t *lock) return (int) _res; } -#if defined(__sparcv7) +#if defined(__sparcv7) || defined(__sparc_v7__) /* * No stbar or membar available, luckily no actually produced hardware * requires a barrier. */ #define S_UNLOCK(lock) (*((volatile slock_t *) (lock)) = 0) -#elif defined(__sparcv8) +#elif defined(__sparcv8) || defined(__sparc_v8__) /* stbar is available (and required for both PSO, RMO), membar isn't */ #define S_UNLOCK(lock) \ do \ |