patch.00

text/plain

Filename: patch.00
Type: text/plain
Part: 0
Message: UNIXWARE port patches.
*** src/backend/port/dynloader/univel.h.orig	Fri Feb 27 23:47:51 1998
--- src/backend/port/dynloader/univel.h	Fri Feb 27 23:48:44 1998
***************
*** 1,23 ****
  /*-------------------------------------------------------------------------
   *
!  * port-protos.h--
   *	  port-specific prototypes for Intel x86/UNIXWARE
   *
   *
   * Copyright (c) 1994, Regents of the University of California
   *
!  * port-protos.h,v 1.2 1995/03/17 06:40:18 andrew Exp
   *
   *-------------------------------------------------------------------------
!   */
! #ifndef PORT_PROTOS_H
! #define PORT_PROTOS_H
! 
! #include <dlfcn.h>
! #include "fmgr.h"				/* for func_ptr */
! #include "utils/dynamic_loader.h"
! 
!  /* dynloader.c */
  /*
   * Dynamic Loader on Intel x86/Intel SVR4.
   *
--- 1,23 ----
  /*-------------------------------------------------------------------------
   *
!  * univel.h--
   *	  port-specific prototypes for Intel x86/UNIXWARE
   *
   *
   * Copyright (c) 1994, Regents of the University of California
   *
!  * univel.h,v 1.2 1995/03/17 06:40:18 andrew Exp
   *
   *-------------------------------------------------------------------------
!   */
! #ifndef PORT_PROTOS_H
! #define PORT_PROTOS_H
! 
! #include <dlfcn.h>
! #include "fmgr.h"				/* for func_ptr */
! #include "utils/dynamic_loader.h"
! 
!  /* dynloader.c */
  /*
   * Dynamic Loader on Intel x86/Intel SVR4.
   *
***************
*** 25,34 ****
   * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
   * library as the file to be dynamically loaded.
   *
!   */
! #define pg_dlopen(f)	dlopen(f,RTLD_LAZY)
! #define pg_dlsym		dlsym
! #define pg_dlclose		dlclose
! #define pg_dlerror		dlerror
! 
! #endif	/* PORT_PROTOS_H */
--- 25,34 ----
   * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
   * library as the file to be dynamically loaded.
   *
!   */
! #define pg_dlopen(f)	dlopen(f,RTLD_LAZY)
! #define pg_dlsym		dlsym
! #define pg_dlclose		dlclose
! #define pg_dlerror		dlerror
! 
! #endif	/* PORT_PROTOS_H */
*** src/backend/port/dynloader/univel.c.orig	Fri Feb 27 23:47:14 1998
--- src/backend/port/dynloader/univel.c	Fri Feb 27 23:47:26 1998
***************
*** 1,4 ****
  /* Dummy file used for nothing at this point
   *
   * see univel.h
!   */
--- 1,4 ----
  /* Dummy file used for nothing at this point
   *
   * see univel.h
!  */
*** src/include/access/heapam.h.orig	Fri Feb 27 23:54:04 1998
--- src/include/access/heapam.h	Sat Feb 28 00:20:11 1998
***************
*** 88,93 ****
--- 88,95 ----
   *
   * ----------------
   */
+ #if !defined(USE_UNIVEL_CC)
+ 
  #define fastgetattr(tup, attnum, tupleDesc, isnull) \
  ( \
  	AssertMacro((attnum) > 0) ? \
***************
*** 130,136 ****
--- 132,188 ----
  	) \
  )
  
+ #else /* !defined(USE_UNIVEL_CC) */
  
+ extern Datum nocachegetattr(HeapTuple tup, int attnum,
+ 						 TupleDesc att, bool *isnull);
+ 
+ static Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+ 						 bool *isnull)
+ {
+     return (
+ 		(attnum) > 0 ?
+ 		(
+ 			((isnull) ? (*(isnull) = false) : (dummyret)NULL),
+ 			HeapTupleNoNulls(tup) ?
+ 			(
+ 				((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 ||
+ 				 (attnum) == 1) ?
+ 				(
+ 					(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]),
+ 						(char *) (tup) + (tup)->t_hoff +
+ 						(
+ 							((attnum) != 1) ?
+ 								(tupleDesc)->attrs[(attnum)-1]->attcacheoff
+ 							:
+ 								0
+ 						)
+ 					)
+ 				)
+ 				:
+ 					nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ 			)
+ 			:
+ 			(
+ 				att_isnull((attnum)-1, (tup)->t_bits) ?
+ 				(
+ 					((isnull) ? (*(isnull) = true) : (dummyret)NULL),
+ 					(Datum)NULL
+ 				)
+ 				:
+ 				(
+ 					nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ 				)
+ 			)
+ 		)
+ 		:
+ 		(
+ 			 (Datum)NULL
+ 		)
+ 	);
+ }
+ 
+ #endif
  
  /* ----------------
   *		heap_getattr
*** src/include/port/univel.h.orig	Fri Feb 27 23:49:09 1998
--- src/include/port/univel.h	Sat Feb 28 00:12:54 1998
***************
*** 9,21 ****
   * Define this if you are compiling with
   * the native UNIXWARE C compiler.
   ***************************************/
! #define USE_UNIVEL_CC_ASM
  typedef unsigned char slock_t;
  
  /***************************************************************
!  * strcasecmp() is in c89, but is not in any include file :-(
   ***************************************************************/
! int			strcasecmp(char *, char *);
  
  #ifndef			BIG_ENDIAN
  #define			BIG_ENDIAN		4321
--- 9,22 ----
   * Define this if you are compiling with
   * the native UNIXWARE C compiler.
   ***************************************/
! #define USE_UNIVEL_CC
  typedef unsigned char slock_t;
  
  /***************************************************************
!  * strcasecmp() is in c89.a. The following include will get the
!  * needed prototype. 
   ***************************************************************/
! #include <strings.h>
  
  #ifndef			BIG_ENDIAN
  #define			BIG_ENDIAN		4321
*** src/include/storage/s_lock.h.orig	Sat Feb 28 00:00:14 1998
--- src/include/storage/s_lock.h	Sat Feb 28 00:08:39 1998
***************
*** 305,325 ****
  
  #if defined(NEED_I386_TAS_ASM)
  
! #if defined(USE_UNIVEL_CC_ASM)
  asm void
  S_LOCK(char *lval)
  {
! 	%lab again;
  /* Upon entry, %eax will contain the pointer to the lock byte */
! 	pushl % ebx
! 		xchgl % eax, %ebx
! 		movb $ - 1, %al
  again:
  	lock
! 		xchgb % al, (%ebx)
! 		cmpb $0, %al
! 		jne again
! 		popl % ebx
  }
  
  #else
--- 305,325 ----
  
  #if defined(NEED_I386_TAS_ASM)
  
! #if defined(USE_UNIVEL_CC)
  asm void
  S_LOCK(char *lval)
  {
! % lab again;
  /* Upon entry, %eax will contain the pointer to the lock byte */
! 	pushl %ebx
! 	xchgl %eax, %ebx
! 	movb $255, %al
  again:
  	lock
! 	xchgb %al, (%ebx)
! 	cmpb $0, %al
! 	jne again
! 	popl %ebx
  }
  
  #else
*** src/template/univel.orig	Fri Feb 27 23:49:36 1998
--- src/template/univel	Fri Feb 27 23:55:12 1998
***************
*** 5,10 ****
  SRCH_LIB:
  USE_LOCALE:no
  DLSUFFIX:.so
- YACC=/usr/ccs/bin/yacc
  YACC:yacc
  CC:cc
--- 5,11 ----
  SRCH_LIB:
  USE_LOCALE:no
  DLSUFFIX:.so
  YACC:yacc
+ YFLAGS:-d
  CC:cc
+ LIBS:-lc89