From 47d385b3f71bf2b4b5c9efa1515f12e274ca5b90 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 31 Dec 2000 03:34:01 +0000 Subject: [PATCH] NetBSD/Alpha porting fixes from tom@minnesota.com. --- src/backend/main/main.c | 5 ++++- src/include/port/netbsd.h | 14 +++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/backend/main/main.c b/src/backend/main/main.c index 6e90d54bf7..7ac7b111ad 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -25,13 +25,16 @@ #include #endif -#if defined(__alpha) && !defined(linux) && !defined(__FreeBSD__) +#if defined(__alpha) && !defined(linux) && !defined(__FreeBSD__) && !defined(__NetBSD__) #include #include "machine/hal_sysinfo.h" #define ASSEMBLER #include #undef ASSEMBLER #endif +#if defined(__NetBSD__) +#include +#endif #include "miscadmin.h" #include "bootstrap/bootstrap.h" diff --git a/src/include/port/netbsd.h b/src/include/port/netbsd.h index 63e4236248..aba5c72fe6 100644 --- a/src/include/port/netbsd.h +++ b/src/include/port/netbsd.h @@ -1,43 +1,47 @@ #if defined(__i386__) #define NEED_I386_TAS_ASM #define HAS_TEST_AND_SET +typedef unsigned char slock_t; #endif #if defined(__sparc__) #define NEED_SPARC_TAS_ASM #define HAS_TEST_AND_SET +typedef unsigned char slock_t; #endif #if defined(__vax__) #define NEED_VAX_TAS_ASM #define HAS_TEST_AND_SET +typedef unsigned char slock_t; #endif #if defined(__ns32k__) #define NEED_NS32K_TAS_ASM #define HAS_TEST_AND_SET +typedef unsigned char slock_t; #endif #if defined(__m68k__) #define HAS_TEST_AND_SET +typedef unsigned char slock_t; #endif #if defined(__arm__) #define HAS_TEST_AND_SET +typedef unsigned char slock_t; #endif #if defined(__mips__) /* # undef HAS_TEST_AND_SET */ #endif -#if defined(__powerpc__) +#if defined(__alpha__) #define HAS_TEST_AND_SET +typedef unsigned long slock_t; #endif #if defined(__powerpc__) +#define HAS_TEST_AND_SET typedef unsigned int slock_t; - -#else -typedef unsigned char slock_t; - #endif -- 2.39.5