diff --git a/src/Makefile.global b/src/Makefile.global
index 4ca93effe30e16f7a8b7e259dfd168d57437a9f1..6b52d5adb7a422feecff6768f32e3f7fadae7bbc 100644
--- a/src/Makefile.global
+++ b/src/Makefile.global
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.20 1996/08/06 16:05:56 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.21 1996/08/19 13:50:41 scrappy Exp $
 #
 # NOTES
 #    This is seen by any Makefiles that include mk/postgres.mk. To
@@ -59,15 +59,15 @@
 #	until after this file is processed!
 #  make sure that you have no whitespaces after the PORTNAME setting
 #  or the makefiles can get confused
-PORTNAME=	BSD44_derived
+PORTNAME=	svr4
 
 # SRCDIR specifies where the source files are.
-SRCDIR=		/home/staff/scrappy/cvs/postgres95/src
+SRCDIR=		/home/tools/postgres95-1.02/src
 
 # For convenience, POSTGRESDIR is where DATADIR, BINDIR, and LIBDIR 
 # and other target destinations are rooted.  Of course, each of these is 
 # changable separately.
-POSTGRESDIR=	/home/staff/scrappy/cvs/postgres95
+POSTGRESDIR=	/home/tools/postgres95-1.02
 
 # POSTGRESLOGIN is the login name of the user who gets special
 # privileges within the database.  By default it is "postgres", but
@@ -130,7 +130,7 @@ CFLAGS+= -DNAMEDATALEN=$(NAMEDATALEN) -DOIDNAMELEN=$(OIDNAMELEN)
 # Comment out CDEBUG to turn off debugging and sanity-checking.
 #
 #	XXX on MIPS, use -g3 if you want to compile with -O
-#CDEBUG= -g
+CDEBUG= -O
 
 # Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
 # multi-byte types to generate a bus error.
@@ -138,7 +138,7 @@ ENFORCE_ALIGNMENT= true
 
 # turn this on if you prefer European style dates instead of American
 # style dates
-# EUROPEAN_DATES = 1
+EUROPEAN_DATES = 1
 
 # Comment out PROFILE to disable profiling.
 #
@@ -154,13 +154,13 @@ ENFORCE_ALIGNMENT= true
 #    and READLINE_LIBDIR to reflect the location of the readline and history
 #    headers and libraries.
 #
-#USE_READLINE= true
+USE_READLINE= true
 
 # directories for the readline and history libraries.
-READLINE_INCDIR=  /usr/local/include
-HISTORY_INCDIR=   /usr/local/include
-READLINE_LIBDIR=  /usr/local/lib
-HISTORY_LIBDIR=   /usr/local/lib
+READLINE_INCDIR=  /home/tools/include
+HISTORY_INCDIR=   /home/tools/include -I/home/tools/include/readline
+READLINE_LIBDIR=  /home/tools/lib
+HISTORY_LIBDIR=   /home/tools/lib
 
 # If you do not plan to use Host based authentication,
 # comment out the following line
@@ -208,19 +208,19 @@ endif
 # location of Tcl/Tk headers and libraries
 #
 # Uncomment this to build the tcl utilities.
-#USE_TCL= true
+USE_TCL= true
 # customize these to your site's needs
 #
-TCL_INCDIR= /usr/local/include
-TCL_LIBDIR= /usr/local/lib
+TCL_INCDIR= /home/tools/include
+TCL_LIBDIR= /home/tools/lib
 TCL_LIB = -ltcl7.5
-TK_INCDIR=  /usr/local/include
-TK_LIBDIR=  /usr/local/lib
+TK_INCDIR=  /home/tools/include
+TK_LIBDIR=  /home/tools/lib
 TK_LIB = -ltk4.1
 
-X11_INCDIR = /usr/X11R6.1/include
-X11_LIBDIR = /usr/X11R6.1/lib
-X11_LIB = -lX11
+X11_INCDIR = /usr/include
+X11_LIBDIR = /usr/lib
+X11_LIB = -lX11 -lsocket -lnsl
 
 #
 # include port specific rules and variables. For instance:
diff --git a/src/backend/Makefile b/src/backend/Makefile
index fbde3abee0cc22528e0e5533e376073ad4fce868..aaaa6683370e073fdd53725ec17c071b5d4b3b6d 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.2 1996/07/31 17:19:49 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.3 1996/08/19 13:51:55 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -118,6 +118,11 @@ ifeq ($(PORTNAME), linux)
 LDADD+= -lc
 endif
 
+# the following is special for Reliant UNIX SVR4 (formerly SINIX)
+ifeq ($(PORTNAME), svr4)
+LDFLAGS+= -LD-Blargedynsym
+endif
+
 postgres: $(POSTGRES_DEPEND) $(OBJS) $(EXPORTS)
 	$(CC) $(LDFLAGS) -o $(objdir)/$(@F) $(addprefix $(objdir)/,$(notdir $(OBJS))) $(LDADD)
 
diff --git a/src/backend/catalog/genbki.sh b/src/backend/catalog/genbki.sh
index 2f7e4025b833ad90262e53c5946ed0f3cd67e219..d8f5d29025411f47dd82bf85a0a4a2add3c06798 100644
--- a/src/backend/catalog/genbki.sh
+++ b/src/backend/catalog/genbki.sh
@@ -10,7 +10,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.1.1.1 1996/07/09 06:21:15 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.2 1996/08/19 13:52:02 scrappy Exp $
 #
 # NOTES
 #    non-essential whitespace is removed from the generated file.
@@ -62,7 +62,7 @@ sed -e 's/\/\*.*\*\///g' \
     -e 's/\ NameData/\ name/g' \
     -e 's/(NameData/(name/g' \
     -e 's/(Oid/(oid/g' | \
-awk '
+gawk '
 # ----------------
 #	now use awk to process remaining .h file..
 #
diff --git a/src/backend/parser/sysfunc.c b/src/backend/parser/sysfunc.c
index c69ca1b5b06d27b02db99d9e2a145c34b8d36ec9..5cc1935b7b082dfc16eafa020fec1a0bdde87d5c 100644
--- a/src/backend/parser/sysfunc.c
+++ b/src/backend/parser/sysfunc.c
@@ -30,8 +30,13 @@ char *Sysfunc_system_date(void)
 	
 	time(&cur_time_secs);
 	cur_time_expanded = localtime(&cur_time_secs);
+#if defined(EUROPEAN_DATES) || defined(EUROPEAN_STYLE)
+	sprintf(buf, "%02.2d-%02.2d-%04.4d", cur_time_expanded->tm_mday,
+			cur_time_expanded->tm_mon+1, cur_time_expanded->tm_year+1900);
+#else
 	sprintf(buf, "%02.2d-%02.2d-%04.4d", cur_time_expanded->tm_mon+1,
 			cur_time_expanded->tm_mday, cur_time_expanded->tm_year+1900);
+#endif
 	return &buf[0];
 }
 
diff --git a/src/backend/storage/ipc.h b/src/backend/storage/ipc.h
index 9dae6da5ffe979d47fe99f9dc1fa2be0a46b6289..4dfe3fdf6639848c8e4a3c54de0dac53384bdd36 100644
--- a/src/backend/storage/ipc.h
+++ b/src/backend/storage/ipc.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: ipc.h,v 1.5 1996/08/04 21:03:23 scrappy Exp $
+ * $Id: ipc.h,v 1.6 1996/08/19 13:52:20 scrappy Exp $
  *
  * NOTES
  *    This file is very architecture-specific.  This stuff should actually
@@ -125,6 +125,7 @@ extern int S_LOCK_FREE(slock_t *lock);
     defined(PORTNAME_i386_solaris) || \
     defined(PORTNAME_sparc_solaris) || \
     defined(PORTNAME_ultrix4) || \
+    defined(PORTNAME_svr4) || \
     defined(WIN32)
 union semun {
     int val;
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index f4b3bef5438951d12c5395d90f4f8dad8ecddd06..82caf28c8f4e979fcfd7a4671d6ca8ec41b1d081 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.2 1996/07/20 08:36:17 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.3 1996/08/19 13:52:35 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1275,7 +1275,7 @@ static int isinf(x)
 }
 #endif /* PORTNAME_alpha */
 
-#if defined(PORTNAME_sparc_solaris)||defined(PORTNAME_i386_solaris)
+#if defined(PORTNAME_sparc_solaris)||defined(PORTNAME_i386_solaris) || defined(PORTNAME_svr4)
 #include <ieeefp.h>
 static int
     isinf(d)
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index 3faa3a216f9494dc63a6db906f431936801bc255..875aa1d82e157fd782f44257ff9fa8ac1dee4e56 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.3 1996/07/22 21:56:03 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.4 1996/08/19 13:52:40 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -296,6 +296,7 @@ tryabsdate(char *fields[], int nf, struct tm *tm, int *tzp)
     defined(PORTNAME_i386_solaris) || \
     defined(PORTNAME_irix5) || \
     defined(PORTNAME_sparc_solaris) || \
+    defined(PORTNAME_svr4) || \
     defined(WIN32)
 	    tzset();
 #ifndef WIN32
diff --git a/src/mk/port/postgres.mk.svr4 b/src/mk/port/postgres.mk.svr4
index 18ce27f071ac488f55cf80efbcd83c07da965d46..f7c132a7d1d7a4a1b1ac583fe779be9d322ff99f 100644
--- a/src/mk/port/postgres.mk.svr4
+++ b/src/mk/port/postgres.mk.svr4
@@ -5,7 +5,7 @@
 #
 # Copyright (c) 1994-5, Regents of the University of California
 #
-#    $Id: postgres.mk.svr4,v 1.1.1.1 1996/07/09 06:22:20 scrappy Exp $
+#    $Id: postgres.mk.svr4,v 1.2 1996/08/19 13:52:54 scrappy Exp $
 #
 # NOTE
 #    This file has not been tested.	-ay 3/95
@@ -14,6 +14,11 @@
 ifndef MK_PORT
 MK_PORT=	svr4
 
+# cc won't work?
+#CC=	gcc
+CC=	cc -W0
+YACC=	bison -y
+
 #
 # for postgres.mk
 #
@@ -23,13 +28,48 @@ CFLAGS_BE+= -DUSE_POSIX_SIGNALS
 # symbol names to tell them what to export/import.
 MAKE_EXPORTS= true
 
+# RANLIB is not used on svr4
+RANLIB=touch
+
+# GNU install
+INSTALL=/home/tools/bin/install
+
+#
+# Random things that must be passed everywhere to enable
+# everything to compile.  :-/
+#
+# The extra -I flag is to scoop up extra BSD-emulating headers.
+CFLAGS_BE+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/svr4
+LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a
+
+LD_ADD+= $(LDADD_BE)
+
+#
+# for postgres.mk
+#
+CFLAGS_OPT=     -O
+
 #
 # for postgres.user.mk
 #
-CFLAGS_SL=	-K pic
+#CFLAGS_SL=	-K pic
+ifeq ($(CC), cc)
+#CFLAGS_SL=	-K PIC
+else
+#CFLAGS_SL=	-fPIC
+endif
+
 SLSUFF=		.so
 
-%.so:  %.o
-	$(LD) -G $(LDFLAGS) -o $(objdir)/$(@F) $(objdir)/$(<F)
+#%.so:  %.o
+#	$(LD) -G $(LDFLAGS) -o $(objdir)/$(@F) $(objdir)/$(<F)
+%.so: %.o
+	$(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
+
+#
+# for postgres.shell.mk
+#
+DASH_N=''
+BACKSLASH_C='\\\\c'
 
 endif