summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2006-11-28 05:54:32 +0000
committerTom Lane2006-11-28 05:54:32 +0000
commit583159ff691fcf16cc422a1c681c9f07961b9119 (patch)
tree27a34cefd5db501ebe2797c78afb620cf59c60a3
parent6db9d267276cb596422c110f2d4e50dffd1a4a45 (diff)
Back-patch HEAD's fixes to recognize __ppc64__ as equivalent to __powerpc64__.
Per confirmation from Brian Wipf that this is correct and necessary for Darwin 64-bit.
-rw-r--r--src/include/storage/s_lock.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 7b94d64c73d..c5731fdbd27 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -66,7 +66,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.142 2005/10/11 20:41:32 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.142.2.1 2006/11/28 05:54:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -323,10 +323,11 @@ tas(volatile slock_t *lock)
#endif /* __sparc__ */
-#if defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
+/* PowerPC */
+#if defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__)
#define HAS_TEST_AND_SET
-#if defined(__powerpc64__)
+#if defined(__ppc64__) || defined(__powerpc64__)
typedef unsigned long slock_t;
#else
typedef unsigned int slock_t;
@@ -366,7 +367,7 @@ tas(volatile slock_t *lock)
/* PowerPC S_UNLOCK is almost standard but requires a "sync" instruction */
#define S_UNLOCK(lock) \
do \
-{\
+{ \
__asm__ __volatile__ (" sync \n"); \
*((volatile slock_t *) (lock)) = 0; \
} while (0)