提交 308da2a4 编写于 作者: H Heikki Linnakangas

Remove obsolete files for unused ports.

These were removed from upstream years ago already, but were left over in
GPDB for some reason. GPDB never supported these.
上级 743b1b52
/* 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);
if(!lastError)
ereport(ERROR, errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("Transer error failed: out of memory"));
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;
}
case $host_os in
bsdi2.0 | bsdi2.1 | bsdi3*) CC=gcc2;;
esac
# src/template/nextstep
AROPT=rc
SHARED_LIB=
DLSUFFIX=.o
CFLAGS="-v -O -K i486,host,inline,loop_unroll -Dsvr4"
LIBS="-lc89"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册