I am unsure how to address this NetBSD/alpha patch.


> Here are minimal patches to get 7.0 beta 3 limping along on NetBSD/alpha
> release 1.4.1. 
> 
> There are lots of problems with the oid handling, and I can't get it
> to successfully even begin to do a make runcheck, make runtest, or
> make bigtest. 
> 
> The results of a maketest are:
> =============== Notes...                              =================
> postmaster must already be running for the regression tests to succeed.
> The time zone is set to PST8PDT for these tests by the client frontend.
> Please report any apparent problems to [EMAIL PROTECTED]
> See regress/README for more information.
> 
> =============== dropping old regression database...   =================
> ERROR:  typeidTypeRelid: Invalid type - oid = 0
> dropdb: database removal failed
> =============== creating new regression database...   =================
> ERROR:  createdb: database 'regression' already exists
> createdb: database creation failed
> createdb failed
> 
> Minimal patches are attached. They are enough to get 7.0 beta 3 up
> and able to do minimal SQL queries. They are also required to get
> it to build at all.
> -- 
> Kevin P. Neal                                http://www.pobox.com/~kpn/
> 
> "You're a slacker if you only give 90% 'cause you are afraid of the \
>   other 10%."    -- Ross Smith               Apr 22 1999 2:29am

[ Attachment, skipping... ]


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
*** ./old/src/backend/main/main.c       Wed Jan 26 00:56:30 2000
--- ./new/src/backend/main/main.c       Fri Apr  7 22:19:30 2000
***************
*** 12,27 ****
--- 12,31 ----
   *
   *-------------------------------------------------------------------------
   */
  #include <unistd.h>
  
+ #if defined(__NetBSD__)
+ #include <sys/param.h>
+ #else
  #if defined(__alpha__) && !defined(linux)
  #include <sys/sysinfo.h>
  #include "machine/hal_sysinfo.h"
  #define ASSEMBLER
  #include <sys/proc.h>
  #undef ASSEMBLER
+ #endif
  #endif
  
  #include "postgres.h"
  #ifdef USE_LOCALE
  #include <locale.h>
*** ./old/src/include/port/netbsd.h     Tue Mar  7 20:58:23 2000
--- ./new/src/include/port/netbsd.h     Sun Apr  9 23:49:37 2000
***************
*** 1,43 ****
  #define USE_POSIX_TIME
  
  #if defined(__i386__)
  #define NEED_I386_TAS_ASM
  #define HAS_TEST_AND_SET
  #endif
  
  #if defined(__sparc__)
  #define NEED_SPARC_TAS_ASM
  #define HAS_TEST_AND_SET
  #endif
  
  #if defined(__vax__)
  #define NEED_VAX_TAS_ASM
  #define HAS_TEST_AND_SET
  #endif
  
  #if defined(__ns32k__)
  #define NEED_NS32K_TAS_ASM
  #define HAS_TEST_AND_SET
  #endif
  
  #if defined(__m68k__)
  #define HAS_TEST_AND_SET
  #endif
  
  #if defined(__arm__)
  #define HAS_TEST_AND_SET
  #endif
  
  #if defined(__mips__)
  /* #  undef HAS_TEST_AND_SET */
  #endif
  
! #if defined(__powerpc__)
  #define HAS_TEST_AND_SET
  #endif
  
  #if defined(__powerpc__)
  typedef unsigned int slock_t;
- #else
- typedef unsigned char slock_t;
  #endif
--- 1,50 ----
  #define USE_POSIX_TIME
  
  #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(__alpha__)
  #define HAS_TEST_AND_SET
+ typedef unsigned long int slock_t;
  #endif
  
  #if defined(__powerpc__)
+ #define HAS_TEST_AND_SET
  typedef unsigned int slock_t;
  #endif
*** ./old/src/include/storage/s_lock.h  Wed Jan 26 00:58:33 2000
--- ./new/src/include/storage/s_lock.h  Sun Apr  9 23:56:46 2000
***************
*** 260,270 ****
--- 260,275 ----
  #else /* i.e. not __osf__ */
  
  #define TAS(lock) tas(lock)
  #define S_UNLOCK(lock) { __asm__("mb"); *(lock) = 0; }
  
+ #if defined(__GNUC__)
+ static int              /* GCC on the Alpha doesn't appear to handle
+                            inlining of assembly with %0 or %1 properly. */
+ #else
  static __inline__ int
+ #endif
  tas(volatile slock_t *lock)
  {
   register slock_t _res;
  
  __asm__("      ldq   $0, %0                      \n\

Reply via email to