*** src/backend/port/dynloader/unixware.c.orig	Sun Jun  7 23:15:47 1998
--- src/backend/port/dynloader/unixware.c	Sun Jun  7 23:19:27 1998
***************
*** 0 ****
--- 1,4 ----
+ /* Dummy file used for nothing at this point
+  *
+  * see unixware.h
+  */
*** src/backend/port/dynloader/unixware.h.orig	Sun Jun  7 23:15:47 1998
--- src/backend/port/dynloader/unixware.h	Sun Jun  7 23:19:28 1998
***************
*** 0 ****
--- 1,34 ----
+ /*-------------------------------------------------------------------------
+  *
+  * unixware.h--
+  *	  port-specific prototypes for Intel x86/UNIXWARE 7
+  *
+  *
+  * Copyright (c) 1994, Regents of the University of California
+  *
+  * unixware.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.
+  *
+  * this dynamic loader uses the system dynamic loading interface for shared
+  * 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/storage/buffer/s_lock.c.orig	Sun Jun  7 23:12:58 1998
--- src/backend/storage/buffer/s_lock.c	Sun Jun  7 23:21:39 1998
***************
*** 269,292 ****
   * i386 based things
   */
  
! #if defined(USE_UNIVEL_CC)
! asm int
! tas(slock_t *s_lock)
! {
! 	%lab locked;
! /* Upon entry, %eax will contain the pointer to the lock byte */
! 	pushl % ebx
! 	xchgl % eax, %ebx
! 	xor % eax, %eax
! 	movb $255, %al
! 	lock
! 	xchgb % al, (%ebx)
! 	popl % ebx
! }
  
- 
- #else /* USE_UNIVEL_CC */
- 
  int
  tas(slock_t *lock)
  {
--- 269,276 ----
   * i386 based things
   */
  
! #if !defined(UNIXWARE)
  
  int
  tas(slock_t *lock)
  {
***************
*** 296,302 ****
  	return (_res != 0);
  }
  
! #endif /* USE_UNIVEL_CC */
  
  #endif /* NEED_I386_TAS_ASM */
  
--- 280,286 ----
  	return (_res != 0);
  }
  
! #endif /* ! UNIXWARE */
  
  #endif /* NEED_I386_TAS_ASM */
  
*** src/include/port/univel.h.orig	Sun Jun  7 23:12:59 1998
--- src/include/port/univel.h	Sun Jun  7 23:21:40 1998
***************
*** 9,15 ****
   * Define this if you are compiling with
   * the native UNIXWARE C compiler.
   ***************************************/
! #define USE_UNIVEL_CC
  typedef unsigned char slock_t;
  
  /***************************************************************
--- 9,15 ----
   * Define this if you are compiling with
   * the native UNIXWARE C compiler.
   ***************************************/
! #define UNIXWARE
  typedef unsigned char slock_t;
  
  /***************************************************************
*** src/include/port/unixware.h.orig	Sun Jun  7 23:15:47 1998
--- src/include/port/unixware.h	Sun Jun  7 23:35:15 1998
***************
*** 0 ****
--- 1,32 ----
+ #define USE_POSIX_TIME
+ #define NO_EMPTY_STMTS
+ #define USE_POSIX_SIGNALS
+ #define SYSV_DIRENT
+ 
+ #define HAS_TEST_AND_SET
+ #define NEED_I386_TAS_ASM
+ /***************************************
+  * Define this if you are compiling with
+  * the native UNIXWARE C compiler.
+  ***************************************/
+ #define UNIXWARE
+ typedef unsigned char slock_t;
+ 
+ /***************************************************************
+  * The following include will get the needed prototype for the 
+  * strcasecmp() function. 
+  ***************************************************************/
+ #include <strings.h>
+ 
+ #ifndef			BIG_ENDIAN
+ #define			BIG_ENDIAN		4321
+ #endif
+ #ifndef			LITTLE_ENDIAN
+ #define			LITTLE_ENDIAN	1234
+ #endif
+ #ifndef			PDP_ENDIAN
+ #define			PDP_ENDIAN		3412
+ #endif
+ #ifndef			BYTE_ORDER
+ #define			BYTE_ORDER		LITTLE_ENDIAN
+ #endif
*** src/include/storage/s_lock.h.orig	Sun Jun  7 23:12:59 1998
--- src/include/storage/s_lock.h	Sun Jun  7 23:21:40 1998
***************
*** 182,187 ****
--- 182,203 ----
  
  
  
+ #if defined(UNIXWARE)
+ 
+ asm int 
+ tas(slock_t *s_lock)
+ {
+ % mem s_lock
+ 	pushl	%ebx
+ 	movl	s_lock,%ebx
+ 	movl	$255,%eax
+ 	lock
+ 	xchgb	%al,(%ebx)
+ 	popl	%ebx
+ }
+ 
+ #endif /* UNIXWARE */
+ 
  #endif /* else defined(linux) */
  
  
*** src/include/version.h.in.orig	Sun Jun  7 23:16:03 1998
--- src/include/version.h.in	Sun Jun  7 23:22:12 1998
***************
*** 20,25 ****
  
  #define PG_VERFILE		"PG_VERSION"
  
! #define PG_VERSION_STR  "PostgreSQL " ## PG_RELEASE ## "." ## PG_VERSION ## "." ## PG_SUBVERSION ## " on @host@, compiled by @CC@ @CC_VERSION@"
  
  #endif
--- 20,25 ----
  
  #define PG_VERFILE		"PG_VERSION"
  
! #define PG_VERSION_STR  "PostgreSQL " PG_RELEASE "." PG_VERSION "." PG_SUBVERSION " on @host@, compiled by @CC@ @CC_VERSION@"
  
  #endif
*** src/makefiles/Makefile.unixware.orig	Sun Jun  7 23:15:47 1998
--- src/makefiles/Makefile.unixware	Sun Jun  7 23:19:28 1998
***************
*** 0 ****
--- 1,7 ----
+ LDFLAGS+= -Wl,-Bexport
+ 
+ %.so: %.o
+ 	$(LD) -G -Bdynamic -o $@ $<
+ 
+ INSTALL= /usr/ucb/install
+ 
*** src/template/unixware.orig	Sun Jun  7 23:15:47 1998
--- src/template/unixware	Sun Jun  7 23:19:28 1998
***************
*** 0 ****
--- 1,8 ----
+ AROPT:crs
+ CFLAGS:-Xa -v -O -K i486,host,inline,loop_unroll,alloca -Dsvr4
+ SHARED_LIB:-K PIC
+ SRCH_INC:
+ SRCH_LIB:
+ USE_LOCALE:no
+ DLSUFFIX:.so
+ CC:cc
*** src/config.guess.orig	Sun Jun  7 23:12:58 1998
--- src/config.guess	Sun Jun  7 23:19:28 1998
***************
*** 450,455 ****
--- 450,458 ----
      i?86:DYNIX/ptx:4*:*)
  	echo i386-sequent-sysv4
  	exit 0 ;;
+     i[34]86:UnixWare:*:*)
+ 	echo ${UNAME_MACHINE}-unixware-sysv${UNAME_RELEASE}
+ 	exit 0 ;;
      i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
  	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
*** src/configure.orig	Sun Jun  7 23:12:58 1998
--- src/configure	Sun Jun  7 23:19:29 1998
***************
*** 622,627 ****
--- 622,628 ----
  		    *) os=unknown need_tas=no ;;
         esac ;;
     sysv4*) os=svr4 need_tas=no ;;
+    sysv5*) os=unixware need_tas=no ;;
  *) echo ""
     echo "*************************************************************"
     echo "configure does not currently recognize your operating system,"
*** src/configure.in.orig	Sun Jun  7 23:12:59 1998
--- src/configure.in	Sun Jun  7 23:19:29 1998
***************
*** 32,37 ****
--- 32,38 ----
  		    *) os=unknown need_tas=no ;;
         esac ;;
     sysv4*) os=svr4 need_tas=no ;;
+    sysv5*) os=unixware need_tas=no ;;
  *) echo ""
     echo "*************************************************************"
     echo "configure does not currently recognize your operating system,"
