mirror of https://github.com/postgres/postgres
This is the minimal version of the Darwin support patch from
Bruce Hartzler <bruceh@mail.utexas.edu>. It contains shared library support, regression test map, and the usual template files. The dynamic loader is missing, the spin lock code apparently doesn't assemble due to syntax problems, and semaphores are to be hoped for from Apple.
This commit is contained in:
parent
dc0f5cb090
commit
b99ee7f37d
|
@ -64,6 +64,7 @@ case $host_os in
|
||||||
beos*) template=beos ;;
|
beos*) template=beos ;;
|
||||||
bsdi*) template=bsdi ;;
|
bsdi*) template=bsdi ;;
|
||||||
cygwin*) template=win ;;
|
cygwin*) template=win ;;
|
||||||
|
darwin*) template=darwin ;;
|
||||||
dgux*) template=dgux ;;
|
dgux*) template=dgux ;;
|
||||||
freebsd*) template=freebsd ;;
|
freebsd*) template=freebsd ;;
|
||||||
hpux*) template=hpux ;;
|
hpux*) template=hpux ;;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Copyright (c) 1998, Regents of the University of California
|
# Copyright (c) 1998, Regents of the University of California
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.30 2000/10/27 23:59:39 petere Exp $
|
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.31 2000/10/31 19:55:18 petere Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -52,9 +52,9 @@
|
||||||
# Got that? Look at src/interfaces/libpq/Makefile for an example.
|
# Got that? Look at src/interfaces/libpq/Makefile for an example.
|
||||||
|
|
||||||
ifndef cplusplus
|
ifndef cplusplus
|
||||||
COMPILER = $(CC)
|
COMPILER = $(CC) $(CFLAGS)
|
||||||
else
|
else
|
||||||
COMPILER = $(CXX)
|
COMPILER = $(CXX) $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,6 +103,11 @@ ifeq ($(PORTNAME), aix)
|
||||||
SHLIB_LINK += -lc
|
SHLIB_LINK += -lc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(PORTNAME), darwin)
|
||||||
|
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
||||||
|
LINK.shared = $(COMPILER) $(CFLAGS_SL)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(PORTNAME), openbsd)
|
ifeq ($(PORTNAME), openbsd)
|
||||||
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
||||||
ifdef ELF_SYSTEM
|
ifdef ELF_SYSTEM
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* This is a place holder until someone supplies a dynamic loader
|
||||||
|
* interface for this platform.
|
||||||
|
*
|
||||||
|
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.1 2000/10/31 19:55:19 petere Exp $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "postgres.h"
|
||||||
|
#include "fmgr.h"
|
||||||
|
#include "utils/dynamic_loader.h"
|
||||||
|
#include "dynloader.h"
|
||||||
|
|
||||||
|
void *
|
||||||
|
pg_dlopen(char *filename)
|
||||||
|
{
|
||||||
|
return (void *) NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
PGFunction
|
||||||
|
pg_dlsym(void *handle, char *funcname)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pg_dlclose(void *handle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
pg_dlerror()
|
||||||
|
{
|
||||||
|
static char errmsg[] = "the dynamic loader for darwin doesn't exist yet";
|
||||||
|
|
||||||
|
return errmsg;
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
/* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.h,v 1.1 2000/10/31 19:55:19 petere Exp $ */
|
||||||
|
void *pg_dlopen(char *filename);
|
||||||
|
PGFunction pg_dlsym(void *handle, char *funcname);
|
||||||
|
void pg_dlclose(void *handle);
|
||||||
|
char *pg_dlerror();
|
|
@ -0,0 +1,6 @@
|
||||||
|
#define HAS_TEST_AND_SET
|
||||||
|
#if defined(__powerpc__)
|
||||||
|
typedef unsigned int slock_t;
|
||||||
|
#else
|
||||||
|
typedef unsigned char slock_t;
|
||||||
|
#endif
|
|
@ -0,0 +1,7 @@
|
||||||
|
AROPT = cr
|
||||||
|
|
||||||
|
DLSUFFIX = .so
|
||||||
|
CFLAGS_SL = -bundle -undefined suppress
|
||||||
|
|
||||||
|
%.so: %.o
|
||||||
|
$(CC) $(CFLAGS) $(CFLAGS_SL) -o $@ $<
|
|
@ -0,0 +1,4 @@
|
||||||
|
# regular cpp is broken in current development releases
|
||||||
|
CC="$CC -traditional-cpp"
|
||||||
|
# be on safe side while they sort out their compiler
|
||||||
|
CFLAGS=-O0
|
|
@ -12,6 +12,7 @@ float8/.*-qnx=float8-exp-three-digits
|
||||||
float8/alpha.*-dec-osf=float8-fp-exception
|
float8/alpha.*-dec-osf=float8-fp-exception
|
||||||
float8/i.86-pc-cygwin=float8-small-is-zero
|
float8/i.86-pc-cygwin=float8-small-is-zero
|
||||||
geometry/.*-bsdi=geometry-positive-zeros-bsd
|
geometry/.*-bsdi=geometry-positive-zeros-bsd
|
||||||
|
geometry/.*-darwin=geometry-positive-zeros
|
||||||
geometry/.*-freebsd=geometry-positive-zeros
|
geometry/.*-freebsd=geometry-positive-zeros
|
||||||
geometry/.*-freebsd4.0=geometry-positive-zeros-bsd
|
geometry/.*-freebsd4.0=geometry-positive-zeros-bsd
|
||||||
geometry/.*-irix6=geometry-irix
|
geometry/.*-irix6=geometry-irix
|
||||||
|
@ -35,6 +36,7 @@ horology/sparc-sun-solaris=horology-solaris-1947
|
||||||
horology/.*-sysv5uw=horology-solaris-1947
|
horology/.*-sysv5uw=horology-solaris-1947
|
||||||
int2/.*-aix4=int2-too-large
|
int2/.*-aix4=int2-too-large
|
||||||
int2/.*-bsdi=int2-too-large
|
int2/.*-bsdi=int2-too-large
|
||||||
|
int2/.*-darwin=int2-too-large
|
||||||
int2/.*-freebsd=int2-too-large
|
int2/.*-freebsd=int2-too-large
|
||||||
int2/.*-irix6=int2-too-large
|
int2/.*-irix6=int2-too-large
|
||||||
int2/.*-netbsd=int2-too-large
|
int2/.*-netbsd=int2-too-large
|
||||||
|
@ -50,6 +52,7 @@ int2/.*-sysv5uw=int2-too-large
|
||||||
int2/.*-beos=int2-range-error
|
int2/.*-beos=int2-range-error
|
||||||
int4/.*-aix4=int4-too-large
|
int4/.*-aix4=int4-too-large
|
||||||
int4/.*-bsdi=int4-too-large
|
int4/.*-bsdi=int4-too-large
|
||||||
|
int4/.*-darwin=int4-too-large
|
||||||
int4/.*-freebsd=int4-too-large
|
int4/.*-freebsd=int4-too-large
|
||||||
int4/.*-irix6=int4-too-large
|
int4/.*-irix6=int4-too-large
|
||||||
int4/.*-netbsd=int4-too-large
|
int4/.*-netbsd=int4-too-large
|
||||||
|
|
Loading…
Reference in New Issue