Skip to content
Snippets Groups Projects
Commit 0624f3dc authored by Bruce Momjian's avatar Bruce Momjian
Browse files

My mailer munged the intro text in my last post. Here is the text

in a more readable form.  -- I am submitting the following patches
to the June 6, 1998 snapshot of PostgreSQL.  These patches implement
a port of PostgreSQL to SCO UnixWare 7, and updates the Univel port
(UnixWare 2.x).  The patched files, and the reason
 for the patch are:

File            Reason for the patch ---------------
---------------------------------------------------------------
src/backend/port/dynloader/unixware.c src/backend/port/dynloader/unixware.h
src/include/port/unixware.h src/makefiles/Makefile.unixware
src/template/unixware
		Created for the UNIXWARE port.

src/include/port/univel.h
		Modifed this file to work with the changes made to
		s_lock.[ch].

src/backend/storage/buffer/s_lock.c src/include/storage/s_lock.h
		Moved the UNIXWARE (and Univel) tas() function from
		s_lock.c to s_lock.h.  The UnixWare compiler asm
		construct is treated as a macro and needs to be in
		the s_lock.h file.  I also reworked the tas()
		function to correct some errors in the code.

src/include/version.h.in
		The use of the ## operator with quoted strings in
		the VERSION macro caused problems with the UnixWare
		C compiler.  I removed the ## operators since they
		were not needed in this case.  The macro expands
		into a sequence of quoted strings that will be
		concatenated by any ANSI C compiler.

src/config.guess
		This script was modified to recognize SCO UnixWare
		7.

src/configure src/configure.in
		The configure script was modified to recognize SCO
		UnixWare 7.

Billy G. Allie
parent 5b4ca671
Branches
Tags
No related merge requests found
/* Dummy file used for nothing at this point
*
* see unixware.h
*/
/*-------------------------------------------------------------------------
*
* 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 */
...@@ -450,6 +450,9 @@ EOF ...@@ -450,6 +450,9 @@ EOF
i?86:DYNIX/ptx:4*:*) i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4 echo i386-sequent-sysv4
exit 0 ;; exit 0 ;;
i[34]86:UnixWare:*:*)
echo ${UNAME_MACHINE}-unixware-sysv${UNAME_RELEASE}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
......
...@@ -626,6 +626,7 @@ nextstep*) os=nextstep need_tas=no ;; ...@@ -626,6 +626,7 @@ nextstep*) os=nextstep need_tas=no ;;
*) os=unknown need_tas=no ;; *) os=unknown need_tas=no ;;
esac ;; esac ;;
sysv4*) os=svr4 need_tas=no ;; sysv4*) os=svr4 need_tas=no ;;
sysv5*) os=unixware need_tas=no ;;
*) echo "" *) echo ""
echo "*************************************************************" echo "*************************************************************"
echo "configure does not currently recognize your operating system," echo "configure does not currently recognize your operating system,"
......
...@@ -32,6 +32,7 @@ nextstep*) os=nextstep need_tas=no ;; ...@@ -32,6 +32,7 @@ nextstep*) os=nextstep need_tas=no ;;
*) os=unknown need_tas=no ;; *) os=unknown need_tas=no ;;
esac ;; esac ;;
sysv4*) os=svr4 need_tas=no ;; sysv4*) os=svr4 need_tas=no ;;
sysv5*) os=unixware need_tas=no ;;
*) echo "" *) echo ""
echo "*************************************************************" echo "*************************************************************"
echo "configure does not currently recognize your operating system," echo "configure does not currently recognize your operating system,"
......
#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
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.40 1998/07/19 01:19:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.41 1998/07/19 04:16:59 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -188,23 +188,22 @@ tas(volatile slock_t *lock) ...@@ -188,23 +188,22 @@ tas(volatile slock_t *lock)
#if defined(NEED_I386_TAS_ASM) #if defined(NEED_I386_TAS_ASM)
/* non gcc i386 based things */ /* non gcc i386 based things */
#if defined(USE_UNIVEL_CC) #if defined(USE_UNIVEL_CC) || defined(UNIXWARE)
#define TAS(lock) tas(lock) #define TAS(lock) tas(lock)
asm int asm int
tas(slock_t *s_lock) tas(slock_t *s_lock)
{ {
%lab locked; % mem s_lock
/* Upon entry, %eax will contain the pointer to the lock byte */
pushl %ebx pushl %ebx
xchgl % eax, %ebx movl s_lock,%ebx
xor % eax, %eax movl $255,%eax
movb $255, %al
lock lock
xchgb %al,(%ebx) xchgb %al,(%ebx)
popl %ebx popl %ebx
} }
#endif /* USE_UNIVEL_CC */
#endif /* USE_UNIVEL_CC || UNIXWARE */
#endif /* NEED_I386_TAS_ASM */ #endif /* NEED_I386_TAS_ASM */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* this file contains the interface to version.c. * this file contains the interface to version.c.
* Also some parameters. * Also some parameters.
* *
* $Header: /cvsroot/pgsql/src/include/Attic/version.h.in,v 1.2 1998/06/09 22:59:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/include/Attic/version.h.in,v 1.3 1998/07/19 04:16:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,6 +20,6 @@ void SetPgVersion(const char *path, char **reason_p); ...@@ -20,6 +20,6 @@ void SetPgVersion(const char *path, char **reason_p);
#define PG_VERFILE "PG_VERSION" #define PG_VERFILE "PG_VERSION"
#define PG_VERSION_STR "PostgreSQL " ## PG_RELEASE ## "." ## PG_VERSION ## "." ## PG_SUBVERSION ## " on @host@, compiled by @CC@ @CC_VERSION@" #define PG_VERSION_STR "PostgreSQL " PG_RELEASE "." PG_VERSION "." PG_SUBVERSION " on @host@, compiled by @CC@ @CC_VERSION@"
#endif #endif
LDFLAGS+= -Wl,-Bexport
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
INSTALL= /usr/ucb/install
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment