diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/port/hpux.h | 27 | ||||
| -rw-r--r-- | src/include/storage/s_lock.h | 17 |
2 files changed, 30 insertions, 14 deletions
diff --git a/src/include/port/hpux.h b/src/include/port/hpux.h index e140c3cfcfc..83296d852ec 100644 --- a/src/include/port/hpux.h +++ b/src/include/port/hpux.h @@ -1,9 +1,3 @@ -#define HAS_TEST_AND_SET -typedef struct -{ - int sema[4]; -} slock_t; - #ifndef BIG_ENDIAN #define BIG_ENDIAN 4321 #endif @@ -13,7 +7,28 @@ typedef struct #ifndef PDP_ENDIAN #define PDP_ENDIAN 3412 #endif + +#if defined(__hppa) + +#define HAS_TEST_AND_SET +typedef struct +{ + int sema[4]; +} slock_t; + #ifndef BYTE_ORDER #define BYTE_ORDER BIG_ENDIAN +#endif + +#elif defined(__ia64) + +#define HAS_TEST_AND_SET +typedef unsigned int slock_t; + +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN +#endif +#else +#error unrecognized CPU type for HP-UX #endif diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 081c79a8297..3dfb515702e 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -63,7 +63,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: s_lock.h,v 1.110 2003/07/20 04:31:32 momjian Exp $ + * $Id: s_lock.h,v 1.111 2003/08/01 19:12:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -114,7 +114,7 @@ tas(volatile slock_t *lock) /* Intel Itanium */ -#ifdef __ia64__ +#if defined(__ia64__) || defined(__ia64) #define TAS(lock) tas(lock) static __inline__ int @@ -131,7 +131,7 @@ tas(volatile slock_t *lock) return (int) ret; } -#endif /* __ia64__ */ +#endif /* __ia64__ || __ia64 */ #if defined(__arm__) || defined(__arm__) @@ -368,8 +368,9 @@ tas(volatile slock_t *s_lock) /************************************************************************* - * These are the platforms that do not use inline assembler (and hence - * have common code for gcc and non-gcc compilers, if both are available). + * These are the platforms that have only one compiler, or do not use inline + * assembler (and hence have common code for gcc and non-gcc compilers, + * if both are available). */ @@ -437,9 +438,9 @@ tas(volatile slock_t *lock) #endif /* __alpha */ -#if defined(__hpux) +#if defined(__hppa) /* - * HP-UX (PA-RISC) + * HP's PA-RISC * * Note that slock_t on PA-RISC is a structure instead of char * (see include/port/hpux.h). @@ -459,7 +460,7 @@ tas(volatile slock_t *lock) #define S_LOCK_FREE(lock) ( *(int *) (((long) (lock) + 15) & ~15) != 0) -#endif /* __hpux */ +#endif /* __hppa */ #if defined(__QNX__) && defined(__WATCOMC__) /* |
