summaryrefslogtreecommitdiff
path: root/src/backend/port
diff options
context:
space:
mode:
authorPeter Eisentraut2012-05-01 19:11:12 +0000
committerPeter Eisentraut2012-05-01 19:11:12 +0000
commitf2f9439fbfba378cb64cd6e5a046e0184cd542c6 (patch)
treee3988f7261fa523aaf0b79f0c0d25dc14b5bdd06 /src/backend/port
parent4266509c577b089627930af39f1dcd2d06b493e9 (diff)
Remove dead ports
Remove the following ports: - dgux - nextstep - sunos4 - svr4 - ultrix4 - univel These are obsolete and not worth rescuing. In most cases, there is circumstantial evidence that they wouldn't work anymore anyway.
Diffstat (limited to 'src/backend/port')
-rw-r--r--src/backend/port/dynloader/dgux.c6
-rw-r--r--src/backend/port/dynloader/dgux.h44
-rw-r--r--src/backend/port/dynloader/irix.h2
-rw-r--r--src/backend/port/dynloader/nextstep.c84
-rw-r--r--src/backend/port/dynloader/nextstep.h26
-rw-r--r--src/backend/port/dynloader/sunos4.c7
-rw-r--r--src/backend/port/dynloader/sunos4.h46
-rw-r--r--src/backend/port/dynloader/svr4.c7
-rw-r--r--src/backend/port/dynloader/svr4.h46
-rw-r--r--src/backend/port/dynloader/ultrix4.c67
-rw-r--r--src/backend/port/dynloader/ultrix4.h109
-rw-r--r--src/backend/port/dynloader/univel.c7
-rw-r--r--src/backend/port/dynloader/univel.h49
-rw-r--r--src/backend/port/dynloader/unixware.h2
-rw-r--r--src/backend/port/nextstep/Makefile17
-rw-r--r--src/backend/port/nextstep/port.c62
16 files changed, 2 insertions, 579 deletions
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 <dlfcn.h>
-#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 <dlfcn.h>
-#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 <dlfcn.h>
-#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 <stdio.h>
-#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 <dlfcn.h>
-#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 <unistd.h>
-#endif
-
-#include <sys/signal.h>
-
-
-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