diff -ru /usr/local/source/postgresql/pgsql/src/backend/main/main.c /usr/local/build/pgsql-current/src/backend/main/main.c --- /usr/local/source/postgresql/pgsql/src/backend/main/main.c Fri Nov 24 21:45:47 2000 +++ /usr/local/build/pgsql-current/src/backend/main/main.c Sat Dec 30 15:06:34 2000 @@ -25,13 +25,14 @@ #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 +#include #include "miscadmin.h" #include "bootstrap/bootstrap.h" diff -ru /usr/local/source/postgresql/pgsql/src/include/port/netbsd.h /usr/local/build/pgsql-current/src/include/port/netbsd.h --- /usr/local/source/postgresql/pgsql/src/include/port/netbsd.h Sun Oct 29 07:17:34 2000 +++ /usr/local/build/pgsql-current/src/include/port/netbsd.h Sat Dec 30 14:59:06 2000 @@ -1,43 +1,48 @@ #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 */ +typedef unsigned char slock_t; #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 diff -ru /usr/local/source/postgresql/pgsql/src/include/storage/s_lock.h /usr/local/build/pgsql-current/src/include/storage/s_lock.h --- /usr/local/source/postgresql/pgsql/src/include/storage/s_lock.h Fri Dec 29 20:34:56 2000 +++ /usr/local/build/pgsql-current/src/include/storage/s_lock.h Sat Dec 30 14:59:37 2000 @@ -241,7 +241,17 @@ #if defined(NEED_NS32K_TAS_ASM) #define TAS(lock) tas(lock) +#if defined(__GNUC__) +/* + * GCC on the Alpha doesn't appear to handle inlining of assembly with + * %0 or %1 properly. This removes the inlining of the tas (test-and-set) + * function, which probably slows things down considerably, but correctness + * first! + */ +static int +#else static __inline__ int +#endif tas(volatile slock_t *lock) { register _res; diff -ru /usr/local/source/postgresql/pgsql/src/interfaces/odbc/psqlodbc.c /usr/local/build/pgsql-current/src/interfaces/odbc/psqlodbc.c --- /usr/local/source/postgresql/pgsql/src/interfaces/odbc/psqlodbc.c Fri Jul 14 11:40:40 2000 +++ /usr/local/build/pgsql-current/src/interfaces/odbc/psqlodbc.c Sat Dec 30 14:50:31 2000 @@ -110,7 +110,7 @@ #else /* not __GNUC__ */ /* These two functions do shared library initialziation on UNIX, well at least - * on Linux. I don't know about other systems. + * on Linux and some of the BSDs. I don't know about other systems. */ BOOL _init(void)