From 40a95aa25b6345d5cb2e9410423b7af51792051d Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 18 May 2006 21:18:40 +0000 Subject: [PATCH] Use unsigned into for slock_t for pre-sparcv8plus. --- src/include/storage/s_lock.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index c0cce4b14b..6d6f5e7d6d 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -66,7 +66,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.154 2006/05/18 16:02:30 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.155 2006/05/18 21:18:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -770,7 +770,12 @@ typedef unsigned char slock_t; #if defined(__sun) && (defined(__i386) || defined(__x86_64__) || defined(__sparc__) || defined(__sparc)) #define HAS_TEST_AND_SET + +#if defined(__sparcv9) || defined(__sparcv8plus) typedef unsigned int slock_t; +#else +typedef unsigned char slock_t; +#endif extern slock_t pg_atomic_cas(volatile slock_t *lock, slock_t with, slock_t cmp); -- 2.40.0