diff --git a/configure b/configure
index 26e6b631a64..871f8626c9c 100755
--- a/configure
+++ b/configure
@@ -2194,7 +2194,6 @@ case $host_os in
cygwin*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
- dgux*) template=dgux ;;
freebsd*) template=freebsd ;;
hpux*) template=hpux ;;
irix*) template=irix ;;
@@ -2202,19 +2201,11 @@ dragonfly*) template=netbsd ;;
template=linux ;;
mingw*) template=win32 ;;
netbsd*) template=netbsd ;;
-nextstep*) template=nextstep ;;
openbsd*) template=openbsd ;;
osf*) template=osf ;;
sco*) template=sco ;;
solaris*) template=solaris ;;
- sunos*) template=sunos4 ;;
- sysv4.2*)
- case $host_vendor in
- univel) template=univel ;;
- esac ;;
- sysv4*) template=svr4 ;;
sysv5*) template=unixware ;;
- ultrix*) template=ultrix4 ;;
esac
if test x"$template" = x"" ; then
diff --git a/configure.in b/configure.in
index 0ed6d01e594..d956c508329 100644
--- a/configure.in
+++ b/configure.in
@@ -59,7 +59,6 @@ case $host_os in
cygwin*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
- dgux*) template=dgux ;;
freebsd*) template=freebsd ;;
hpux*) template=hpux ;;
irix*) template=irix ;;
@@ -67,19 +66,11 @@ dragonfly*) template=netbsd ;;
template=linux ;;
mingw*) template=win32 ;;
netbsd*) template=netbsd ;;
-nextstep*) template=nextstep ;;
openbsd*) template=openbsd ;;
osf*) template=osf ;;
sco*) template=sco ;;
solaris*) template=solaris ;;
- sunos*) template=sunos4 ;;
- sysv4.2*)
- case $host_vendor in
- univel) template=univel ;;
- esac ;;
- sysv4*) template=svr4 ;;
sysv5*) template=unixware ;;
- ultrix*) template=ultrix4 ;;
esac
if test x"$template" = x"" ; then
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index 58767eea2f6..0c92c89ac89 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1682,9 +1682,9 @@ libpq.so.2.1: cannot open shared object file: No such file or directory
ldconfig
- If you are on BSD/OS>, Linux>, or SunOS 4>
- and you have root access you can run:
+ If you are on BSD/OS>
+ or Linux>, and you have root access you can
+ run:
/sbin/ldconfig /usr/local/pgsql/lib
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 983abc37ebd..0304f7a2aa7 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -268,10 +268,6 @@ ifeq ($(PORTNAME), solaris)
endif
endif
-ifeq ($(PORTNAME), sunos4)
- LINK.shared = $(LD) -assert pure-text -Bdynamic
-endif
-
ifeq ($(PORTNAME), osf)
LINK.shared = $(LD) -shared -expect_unresolved '*'
endif
@@ -288,14 +284,6 @@ ifeq ($(PORTNAME), sco)
endif
endif
-ifeq ($(PORTNAME), svr4)
- LINK.shared = $(LD) -G
-endif
-
-ifeq ($(PORTNAME), univel)
- LINK.shared = $(LD) -G -z text
-endif
-
ifeq ($(PORTNAME), unixware)
ifeq ($(GCC), yes)
LINK.shared = $(CC) -shared
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index afe4efbb305..9675f5ed1f6 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -224,10 +224,6 @@ startup_hacks(const char *progname)
*/
#ifdef NOFIXADE
-#if defined(ultrix4)
- syscall(SYS_sysmips, MIPS_FIXADE, 0, NULL, NULL, NULL);
-#endif
-
#if defined(__alpha) /* no __alpha__ ? */
{
int buffer[] = {SSIN_UACPROC, UAC_SIGBUS | UAC_NOPRINT};
diff --git a/src/backend/port/dynloader/dgux.c b/src/backend/port/dynloader/dgux.c
deleted file mode 100644
index 34fbcaf2288..00000000000
--- a/src/backend/port/dynloader/dgux.c
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Dummy file used for nothing at this point
- *
- * see dgux.h
- *
- * src/backend/port/dynloader/dgux.c
- */
diff --git a/src/backend/port/dynloader/dgux.h b/src/backend/port/dynloader/dgux.h
deleted file mode 100644
index c753bf27209..00000000000
--- a/src/backend/port/dynloader/dgux.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * dgux.h
- *
- * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/backend/port/dynloader/dgux.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include
-#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-
-/*
- * Dynamic Loader on DG/UX.
- *
- * 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.
- */
-
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
- * if available, but it doesn't exist everywhere.
- * If it doesn't exist, set it to 0 so it has no effect.
- */
-#ifndef RTLD_NOW
-#define RTLD_NOW 1
-#endif
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
-#define pg_dlsym dlsym
-#define pg_dlclose dlclose
-#define pg_dlerror dlerror
-
-#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/irix.h b/src/backend/port/dynloader/irix.h
index 6dea71bb759..ea8fc7ca151 100644
--- a/src/backend/port/dynloader/irix.h
+++ b/src/backend/port/dynloader/irix.h
@@ -18,7 +18,7 @@
#include "utils/dynamic_loader.h" /* pgrminclude ignore */
/*
- * Dynamic Loader on SunOS 4.
+ * Dynamic Loader on Irix.
*
* this dynamic loader uses the system dynamic loading interface for shared
* libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
diff --git a/src/backend/port/dynloader/nextstep.c b/src/backend/port/dynloader/nextstep.c
deleted file mode 100644
index 432b1487160..00000000000
--- a/src/backend/port/dynloader/nextstep.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* src/backend/port/dynloader/nextstep.c */
-
-#include "postgres.h"
-
-#include "mach-o/rld.h"
-#include "streams/streams.h"
-
-static char *lastError = NULL;
-
-static NXStream *
-OpenError()
-{
- return NXOpenMemory(NULL, 0, NX_WRITEONLY);
-}
-
-static void
-CloseError(NXStream * s)
-{
- if (s)
- NXCloseMemory(s, NX_FREEBUFFER);
-}
-
-static void
-TransferError(NXStream * s)
-{
- char *buffer;
- int len,
- maxlen;
-
- if (lastError)
- free(lastError);
- NXGetMemoryBuffer(s, &buffer, &len, &maxlen);
- lastError = malloc(len + 1);
- strcpy(lastError, buffer);
-}
-
-void *
-next_dlopen(char *name)
-{
- int rld_success;
- NXStream *errorStream;
- char *result = NULL;
- char **p;
-
- errorStream = OpenError();
- p = calloc(2, sizeof(void *));
- p[0] = name;
- rld_success = rld_load(errorStream, NULL, p, NULL);
- free(p);
-
- if (!rld_success)
- {
- TransferError(errorStream);
- result = (char *) 1;
- }
- CloseError(errorStream);
- return result;
-}
-
-int
-next_dlclose(void *handle)
-{
- return 0;
-}
-
-void *
-next_dlsym(void *handle, char *symbol)
-{
- NXStream *errorStream = OpenError();
- char symbuf[1024];
- unsigned long symref = 0;
-
- snprintf(symbuf, sizeof(symbuf), "_%s", symbol);
- if (!rld_lookup(errorStream, symbuf, &symref))
- TransferError(errorStream);
- CloseError(errorStream);
- return (void *) symref;
-}
-
-char *
-next_dlerror(void)
-{
- return lastError;
-}
diff --git a/src/backend/port/dynloader/nextstep.h b/src/backend/port/dynloader/nextstep.h
deleted file mode 100644
index 4c680d08273..00000000000
--- a/src/backend/port/dynloader/nextstep.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * port_protos.h
- * port-specific prototypes for NeXT
- *
- * src/backend/port/dynloader/nextstep.h
- */
-
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-
-void *next_dlopen(char *name);
-int next_dlclose(void *handle);
-void *next_dlsym(void *handle, char *symbol);
-char *next_dlerror(void);
-
-#define pg_dlopen(f) next_dlopen
-#define pg_dlsym next_dlsym
-#define pg_dlclose next_dlclose
-#define pg_dlerror next_dlerror
-
-/* port.c */
-
-#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/sunos4.c b/src/backend/port/dynloader/sunos4.c
deleted file mode 100644
index a43085df0a1..00000000000
--- a/src/backend/port/dynloader/sunos4.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * src/backend/port/dynloader/sunos4.c
- *
- * Dummy file used for nothing at this point
- *
- * see sunos4.h
- */
diff --git a/src/backend/port/dynloader/sunos4.h b/src/backend/port/dynloader/sunos4.h
deleted file mode 100644
index 2174300e23f..00000000000
--- a/src/backend/port/dynloader/sunos4.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * sunos4.h
- * port-specific prototypes for SunOS 4
- *
- *
- * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/backend/port/dynloader/sunos4.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include
-#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-
-/*
- * Dynamic Loader on SunOS 4.
- *
- * 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.
- */
-
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
- * if available, but it doesn't exist everywhere.
- * If it doesn't exist, set it to 0 so it has no effect.
- */
-#ifndef RTLD_NOW
-#define RTLD_NOW 1
-#endif
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
-#define pg_dlsym dlsym
-#define pg_dlclose dlclose
-#define pg_dlerror dlerror
-
-#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/svr4.c b/src/backend/port/dynloader/svr4.c
deleted file mode 100644
index bd4d342b2f1..00000000000
--- a/src/backend/port/dynloader/svr4.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * src/backend/port/dynloader/svr4.c
- *
- * Dummy file used for nothing at this point
- *
- * see svr4.h
- */
diff --git a/src/backend/port/dynloader/svr4.h b/src/backend/port/dynloader/svr4.h
deleted file mode 100644
index c8ac19728f9..00000000000
--- a/src/backend/port/dynloader/svr4.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * svr4.h
- * port-specific prototypes for Intel x86/Intel SVR4
- *
- *
- * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/backend/port/dynloader/svr4.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include
-#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-
-/*
- * 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.
- */
-
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
- * if available, but it doesn't exist everywhere.
- * If it doesn't exist, set it to 0 so it has no effect.
- */
-#ifndef RTLD_NOW
-#define RTLD_NOW 1
-#endif
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
-#define pg_dlsym dlsym
-#define pg_dlclose dlclose
-#define pg_dlerror dlerror
-
-#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/ultrix4.c b/src/backend/port/dynloader/ultrix4.c
deleted file mode 100644
index f1a21502a3a..00000000000
--- a/src/backend/port/dynloader/ultrix4.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * ultrix4.c
- * This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x.
- *
- * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- * src/backend/port/dynloader/ultrix4.c
- *
- *-------------------------------------------------------------------------
- */
-#include "postgres.h"
-
-#include "dl.h"
-#include "utils/dynamic_loader.h"
-
-extern char my_exec_path[];
-
-void *
-pg_dlopen(char *filename)
-{
- static int dl_initialized = 0;
- void *handle;
-
- /*
- * initializes the dynamic loader with the executable's pathname. (only
- * needs to do this the first time pg_dlopen is called.)
- */
- if (!dl_initialized)
- {
- if (!dl_init(my_exec_path))
- return NULL;
-
- /*
- * if there are undefined symbols, we want dl to search from the
- * following libraries also.
- */
- dl_setLibraries("/usr/lib/libm_G0.a:/usr/lib/libc_G0.a");
- dl_initialized = 1;
- }
-
- /*
- * open the file. We do the symbol resolution right away so that we will
- * know if there are undefined symbols. (This is in fact the same
- * semantics as "ld -A". ie. you cannot have undefined symbols.
- */
- if ((handle = dl_open(filename, DL_NOW)) == NULL)
- {
- int count;
- char **list = dl_undefinedSymbols(&count);
-
- /* list the undefined symbols, if any */
- if (count)
- {
- while (*list)
- {
- elog(WARNING, "\"%s\" is undefined", *list);
- list++;
- }
- }
- }
-
- return (void *) handle;
-}
diff --git a/src/backend/port/dynloader/ultrix4.h b/src/backend/port/dynloader/ultrix4.h
deleted file mode 100644
index 985013116d5..00000000000
--- a/src/backend/port/dynloader/ultrix4.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * dl.h
- *
- *
- *
- * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/backend/port/dynloader/ultrix4.h
- *
- *-------------------------------------------------------------------------
- */
-/*
- * Ultrix 4.x Dynamic Loader Library Version 1.0
- *
- * dl.h
- * header file for the Dynamic Loader Library
- */
-#ifndef _DL_HEADER_
-#define _DL_HEADER_
-
-#include
-#include "filehdr.h"
-#include "syms.h"
-#include "ldfcn.h"
-#include "reloc.h"
-#include "scnhdr.h"
-
-
-typedef long CoreAddr;
-
-
-typedef struct ScnInfo
-{
- CoreAddr addr; /* starting address of the section */
- SCNHDR hdr; /* section header */
- RELOC *relocEntries; /* relocation entries */
-} ScnInfo;
-
-typedef enum
-{
- DL_NEEDRELOC, /* still need relocation */
- DL_RELOCATED, /* no relocation necessary */
- DL_INPROG /* relocation in progress */
-} dlRStatus;
-
-typedef struct JmpTbl
-{
- char *block; /* the jump table memory block */
- struct JmpTbl *next; /* next block */
-} JmpTbl;
-
-typedef struct dlFile
-{
- char *filename; /* file name of the object file */
-
- int textSize; /* used by mprotect */
- CoreAddr textAddress; /* start addr of text section */
- long textVaddr; /* vaddr of text section in obj file */
- CoreAddr rdataAddress; /* start addr of rdata section */
- long rdataVaddr; /* vaddr of text section in obj file */
- CoreAddr dataAddress; /* start addr of data section */
- long dataVaddr; /* vaddr of text section in obj file */
- CoreAddr bssAddress; /* start addr of bss section */
- long bssVaddr; /* vaddr of text section in obj file */
-
- int nsect; /* number of sections */
- ScnInfo *sect; /* details of each section (array) */
-
- int issExtMax; /* size of string space */
- char *extss; /* extern sym string space (in core) */
- int iextMax; /* maximum number of Symbols */
- pEXTR extsyms; /* extern syms */
-
- dlRStatus relocStatus; /* what relocation needed? */
- int needReloc;
-
- JmpTbl *jmptable; /* the jump table for R_JMPADDR */
-
- struct dlFile *next; /* next member of the archive */
-} dlFile;
-
-typedef struct dlSymbol
-{
- char *name; /* name of the symbol */
- long addr; /* address of the symbol */
- dlFile *objFile; /* from which file */
-} dlSymbol;
-
-/*
- * prototypes for the dl* interface
- */
-extern void *dl_open( /* char *filename, int mode */ );
-extern void *dl_sym( /* void *handle, char *name */ );
-extern void dl_close( /* void *handle */ );
-extern char *dl_error( /* void */ );
-
-#define DL_LAZY 0 /* lazy resolution */
-#define DL_NOW 1 /* immediate resolution */
-
-/*
- * Miscellaneous utility routines:
- */
-extern char **dl_undefinedSymbols( /* int *count */ );
-extern void dl_printAllSymbols( /* void *handle */ );
-extern void dl_setLibraries( /* char *libs */ );
-
-#endif /* _DL_HEADER_ */
diff --git a/src/backend/port/dynloader/univel.c b/src/backend/port/dynloader/univel.c
deleted file mode 100644
index ffa7177d5e0..00000000000
--- a/src/backend/port/dynloader/univel.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * src/backend/port/dynloader/univel.c
- *
- * Dummy file used for nothing at this point
- *
- * see univel.h
- */
diff --git a/src/backend/port/dynloader/univel.h b/src/backend/port/dynloader/univel.h
deleted file mode 100644
index 53a705cc34b..00000000000
--- a/src/backend/port/dynloader/univel.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * src/backend/port/dynloader/univel.h
- *
- *-------------------------------------------------------------------------
- *
- * univel.h
- * port-specific prototypes for Intel x86/UNIXWARE
- *
- *
- * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
- * Portions 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
-#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-
-/*
- * 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.
- */
-
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
- * if available, but it doesn't exist everywhere.
- * If it doesn't exist, set it to 0 so it has no effect.
- */
-#ifndef RTLD_NOW
-#define RTLD_NOW 1
-#endif
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
-#define pg_dlsym dlsym
-#define pg_dlclose dlclose
-#define pg_dlerror dlerror
-
-#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/unixware.h b/src/backend/port/dynloader/unixware.h
index 1c4e3f904ff..19141ca8d02 100644
--- a/src/backend/port/dynloader/unixware.h
+++ b/src/backend/port/dynloader/unixware.h
@@ -21,7 +21,7 @@
#include "utils/dynamic_loader.h" /* pgrminclude ignore */
/*
- * Dynamic Loader on Intel x86/Intel SVR4.
+ * Dynamic Loader on UnixWare.
*
* this dynamic loader uses the system dynamic loading interface for shared
* libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
diff --git a/src/backend/port/nextstep/Makefile b/src/backend/port/nextstep/Makefile
deleted file mode 100644
index d6cda343e21..00000000000
--- a/src/backend/port/nextstep/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile--
-# Makefile for port/nextstep
-#
-# IDENTIFICATION
-# src/backend/port/nextstep/Makefile
-#
-#-------------------------------------------------------------------------
-
-subdir = src/backend/port/nextstep
-top_builddir = ../../../..
-include $(top_builddir)/src/Makefile.global
-
-OBJS = port.o
-
-include $(top_srcdir)/src/backend/common.mk
diff --git a/src/backend/port/nextstep/port.c b/src/backend/port/nextstep/port.c
deleted file mode 100644
index f81a83a17a0..00000000000
--- a/src/backend/port/nextstep/port.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * src/backend/port/nextstep/port.c
- */
-#include "postgres.h"
-
-#ifndef _POSIX_SOURCE
-#include "libc.h"
-#else
-#include
-#endif
-
-#include
-
-
-void
-putenv(char *name)
-{
- extern char **environ;
- static int was_mallocated = 0;
- int size;
-
- /* Compute the size of environ array including the final NULL */
- for (size = 1; environ[size++];)
- /* nothing */ ;
-
- if (!was_mallocated)
- {
- char **tmp = environ;
- int i;
-
- was_mallocated = 1;
- environ = malloc(size * sizeof(char *));
- for (i = 0; i < size; i++)
- environ[i] = tmp[i];
- }
-
- environ = realloc(environ, (size + 1) * sizeof(char *));
- environ[size - 1] = strcpy(malloc(strlen(name) + 1), name);
- environ[size] = NULL;
-}
-
-#ifndef _POSIX_SOURCE
-int
-sigaddset(int *set, int signo)
-{
- *set |= sigmask(signo);
- return *set;
-}
-
-int
-sigemptyset(int *set)
-{
- return *set = 0;
-}
-
-char *
-getcwd(char *buf, size_t size)
-{
- return getwd(buf);
-}
-
-#endif
diff --git a/src/include/port/dgux.h b/src/include/port/dgux.h
deleted file mode 100644
index 582be12612b..00000000000
--- a/src/include/port/dgux.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* src/include/port/dgux.h */
-
-/* nothing needed */
diff --git a/src/include/port/nextstep.h b/src/include/port/nextstep.h
deleted file mode 100644
index ff4ea40f4e5..00000000000
--- a/src/include/port/nextstep.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* src/include/port/nextstep.h */
-
-#include "libc.h"
-#include
-#if defined(__STRICT_ANSI__)
-#define isascii(c) ((unsigned)(c)<=0177)
-#endif
-extern char *strdup(const char *string);
-
-#ifndef _POSIX_SOURCE
-typedef unsigned short mode_t;
-typedef int sigset_t;
-
-#define SIG_BLOCK 00
-#define SIG_UNBLOCK 01
-#define SIG_SETMASK 02
-#endif
-
-#define NO_WAITPID
diff --git a/src/include/port/sunos4.h b/src/include/port/sunos4.h
deleted file mode 100644
index 3e39e1efc9f..00000000000
--- a/src/include/port/sunos4.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * src/include/port/sunos4.h
- *
- * sprintf() returns char *, not int, on SunOS 4.1.x */
-#define SPRINTF_CHAR
-
-#include
diff --git a/src/include/port/svr4.h b/src/include/port/svr4.h
deleted file mode 100644
index 57b270c8568..00000000000
--- a/src/include/port/svr4.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* src/include/port/svr4.h */
-
-/* nothing needed */
diff --git a/src/include/port/ultrix4.h b/src/include/port/ultrix4.h
deleted file mode 100644
index 279f990f7f6..00000000000
--- a/src/include/port/ultrix4.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * src/include/port/ultrix4.h
- */
-#define NOFIXADE
-#define NEED_STRDUP
-
-/*
- * Except for those system calls and library functions that are either
- * - covered by the C standard library and Posix.1
- * - or need a declaration to declare parameter or return types,
- * most Ultrix 4 calls are not declared in the system header files.
- * The rest of this header is used to remedy this for PostgreSQL to give a
- * warning-free compilation.
- */
-
-#include /* Declare various types, e.g. size_t, fd_set */
-
-extern int fp_class_d(double);
-extern long random(void);
-
-struct rusage;
-extern int getrusage(int, struct rusage *);
-
-extern int ioctl(int, unsigned long,...);
-
-extern int socket(int, int, int);
-struct sockaddr;
-extern int connect(int, const struct sockaddr *, int);
-typedef int ssize_t;
-extern ssize_t send(int, const void *, size_t, int);
-extern ssize_t recv(int, void *, size_t, int);
-extern int setsockopt(int, int, int, const void *, int);
-extern int bind(int, const struct sockaddr *, int);
-extern int listen(int, int);
-extern int accept(int, struct sockaddr *, int *);
-extern int getsockname(int, struct sockaddr *, int *);
-extern ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, int *);
-extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, int);
-struct timeval;
-extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
-
-extern int gethostname(char *, int);
-
-extern int getopt(int, char *const *, const char *);
-extern int putenv(const char *);
-
-struct itimerval;
-extern int setitimer(int, const struct itimerval *, struct itimerval *);
-struct timezone;
-extern int gettimeofday(struct timeval *, struct timezone *);
-
-extern int fsync(int);
-extern int ftruncate(int, off_t);
-
-extern char *crypt(char *, char *);
-
-/* End of ultrix4.h */
diff --git a/src/include/port/univel.h b/src/include/port/univel.h
deleted file mode 100644
index bb2409bd89d..00000000000
--- a/src/include/port/univel.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * src/include/port/univel.h
- *
- ***************************************
- * Define this if you are compiling with
- * the native UNIXWARE C compiler.
- ***************************************/
-#define USE_UNIVEL_CC
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index d43aeca0020..d4a783f63d4 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -884,19 +884,6 @@ typedef int slock_t;
#endif /* _AIX */
-#if defined (nextstep) /* Nextstep */
-#define HAS_TEST_AND_SET
-
-typedef struct mutex slock_t;
-
-#define S_LOCK(lock) mutex_lock(lock)
-#define S_UNLOCK(lock) mutex_unlock(lock)
-#define S_INIT_LOCK(lock) mutex_init(lock)
-/* For Mach, we have to delve inside the entrails of `struct mutex'. Ick! */
-#define S_LOCK_FREE(alock) ((alock)->lock == 0)
-#endif /* nextstep */
-
-
/* These are in s_lock.c */
diff --git a/src/makefiles/Makefile.dgux b/src/makefiles/Makefile.dgux
deleted file mode 100644
index 0c34d4a3901..00000000000
--- a/src/makefiles/Makefile.dgux
+++ /dev/null
@@ -1,9 +0,0 @@
-AROPT = crs
-DLSUFFIX = .so
-CFLAGS_SL = -fpic
-
-# Rule for building a shared library from a single .o file
-%.so: %.o
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ $<
-
-sqlmansect = 5
diff --git a/src/makefiles/Makefile.sunos4 b/src/makefiles/Makefile.sunos4
deleted file mode 100644
index d19e165ea53..00000000000
--- a/src/makefiles/Makefile.sunos4
+++ /dev/null
@@ -1,12 +0,0 @@
-AROPT = cr
-
-DLSUFFIX = .so
-ifeq ($(GCC), yes)
-CFLAGS_SL = -fpic
-else
-CFLAGS_SL = -PIC
-endif
-
-# Rule for building a shared library from a single .o file
-%.so: %.o
- $(LD) -assert pure-text -Bdynamic -o $@ $<
diff --git a/src/makefiles/Makefile.svr4 b/src/makefiles/Makefile.svr4
deleted file mode 100644
index 44a6f1c34ad..00000000000
--- a/src/makefiles/Makefile.svr4
+++ /dev/null
@@ -1,15 +0,0 @@
-# MAKE_EXPORTS is required for svr4 loaders that want a file of
-# symbol names to tell them what to export/import.
-#MAKE_EXPORTS= true
-
-LIBS += -lc /usr/ucblib/libucb.a
-LDFLAGS += -LD-Blargedynsym
-
-DLSUFFIX = .so
-CFLAGS_SL =
-
-# Rule for building a shared library from a single .o file
-%.so: %.o
- $(LD) -G -Bdynamic -o $@ $<
-
-sqlmansect = 5
diff --git a/src/makefiles/Makefile.ultrix4 b/src/makefiles/Makefile.ultrix4
deleted file mode 100644
index 6685b8c0af6..00000000000
--- a/src/makefiles/Makefile.ultrix4
+++ /dev/null
@@ -1,11 +0,0 @@
-# used by initdb
-SHELL=/bin/sh5
-AROPT = crs
-
-DLSUFFIX = .so
-# "-G 0" works for both DEC cc and GNU cc.
-CFLAGS_SL = -G 0
-
-# Rule for building a shared library from a single .c file
-%.so: %.c
- $(CC) -c -G 0 $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $<
diff --git a/src/makefiles/Makefile.univel b/src/makefiles/Makefile.univel
deleted file mode 100644
index eb0d324ae64..00000000000
--- a/src/makefiles/Makefile.univel
+++ /dev/null
@@ -1,10 +0,0 @@
-AROPT = crs
-export_dynamic = -Wl,-Bexport
-DLSUFFIX = .so
-CFLAGS_SL = -K PIC
-
-# Rule for building a shared library from a single .o file
-%.so: %.o
- $(LD) -G -Bdynamic -o $@ $<
-
-sqlmansect = 5
diff --git a/src/template/dgux b/src/template/dgux
deleted file mode 100644
index 94aee2a611c..00000000000
--- a/src/template/dgux
+++ /dev/null
@@ -1 +0,0 @@
-# src/template/dgux
diff --git a/src/template/nextstep b/src/template/nextstep
deleted file mode 100644
index 381ada6fadc..00000000000
--- a/src/template/nextstep
+++ /dev/null
@@ -1,5 +0,0 @@
-# src/template/nextstep
-
-AROPT=rc
-SHARED_LIB=
-DLSUFFIX=.o
diff --git a/src/template/sunos4 b/src/template/sunos4
deleted file mode 100644
index 762fca184d6..00000000000
--- a/src/template/sunos4
+++ /dev/null
@@ -1,7 +0,0 @@
-if test "$GCC" != yes ; then
- CC="$CC -Xa" # relaxed ISO C mode
- CFLAGS="-v -DSUNOS_CC" # -v is like gcc -Wall
- if test "$enable_debug" != yes; then
- CFLAGS="$CFLAGS -O" # any optimization breaks debug
- fi
-fi
diff --git a/src/template/svr4 b/src/template/svr4
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/src/template/ultrix4 b/src/template/ultrix4
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/src/template/univel b/src/template/univel
deleted file mode 100644
index 30980fee0a5..00000000000
--- a/src/template/univel
+++ /dev/null
@@ -1,2 +0,0 @@
-CFLAGS="-v -O -K i486,host,inline,loop_unroll -Dsvr4"
-LIBS="-lc89"