diff -urN postgresql-7.4.2/src/Makefile.shlib postgresql-7.4.2.new/src/Makefile.shlib --- postgresql-7.4.2/src/Makefile.shlib Mon Oct 20 02:34:33 2003 +++ postgresql-7.4.2.new/src/Makefile.shlib Wed Mar 31 08:23:20 2004 @@ -81,8 +81,15 @@ endif ifeq ($(PORTNAME), darwin) - shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) - LINK.shared = $(COMPILER) -bundle +ifeq ($(BUNDLE), no) + LINK.shared = /usr/bin/libtool -noall_load -read_only_relocs warning \ + -undefined warning -single_module -flat_namespace -dynamic + DLSUFFIX=.dylib +else + LINK.shared = $(COMPILER) -bundle + DLSUFFIX=.so +endif + shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) endif ifeq ($(PORTNAME), openbsd) diff -urN postgresql-7.4.2/src/backend/port/dynloader/darwin.c postgresql-7.4.2.new/src/backend/port/dynloader/darwin.c --- postgresql-7.4.2/src/backend/port/dynloader/darwin.c Mon Aug 4 01:43:21 2003 +++ postgresql-7.4.2.new/src/backend/port/dynloader/darwin.c Fri Mar 19 06:09:18 2004 @@ -7,6 +7,8 @@ */ #include "postgres.h" + +#define __private_extern__ #include #include "dynloader.h" diff -urN postgresql-7.4.2/src/interfaces/ecpg/compatlib/Makefile postgresql-7.4.2.new/src/interfaces/ecpg/compatlib/Makefile --- postgresql-7.4.2/src/interfaces/ecpg/compatlib/Makefile Tue Feb 10 07:26:48 2004 +++ postgresql-7.4.2.new/src/interfaces/ecpg/compatlib/Makefile Wed Mar 31 07:28:12 2004 @@ -12,6 +12,8 @@ top_builddir = ../../../.. include $(top_builddir)/src/Makefile.global +BUNDLE=no + NAME= ecpg_compat SO_MAJOR_VERSION= 1 SO_MINOR_VERSION= 1 diff -urN postgresql-7.4.2/src/interfaces/ecpg/ecpglib/Makefile postgresql-7.4.2.new/src/interfaces/ecpg/ecpglib/Makefile --- postgresql-7.4.2/src/interfaces/ecpg/ecpglib/Makefile Tue Feb 10 07:26:48 2004 +++ postgresql-7.4.2.new/src/interfaces/ecpg/ecpglib/Makefile Wed Mar 31 07:28:25 2004 @@ -12,6 +12,8 @@ top_builddir = ../../../.. include $(top_builddir)/src/Makefile.global +BUNDE=no + NAME= ecpg SO_MAJOR_VERSION= 4 SO_MINOR_VERSION= 1 diff -urN postgresql-7.4.2/src/interfaces/libpq/Makefile postgresql-7.4.2.new/src/interfaces/libpq/Makefile --- postgresql-7.4.2/src/interfaces/libpq/Makefile Sat Sep 27 16:32:48 2003 +++ postgresql-7.4.2.new/src/interfaces/libpq/Makefile Wed Mar 31 07:26:00 2004 @@ -12,6 +12,7 @@ top_builddir = ../../.. include $(top_builddir)/src/Makefile.global +BUNDLE=no # shared library parameters NAME= pq diff -urN postgresql-7.4.2/src/makefiles/Makefile.darwin postgresql-7.4.2.new/src/makefiles/Makefile.darwin --- postgresql-7.4.2/src/makefiles/Makefile.darwin Mon Oct 27 07:42:34 2003 +++ postgresql-7.4.2.new/src/makefiles/Makefile.darwin Wed Mar 31 07:13:21 2004 @@ -1,13 +1,22 @@ AROPT = crs AWK= awk -DLSUFFIX = .so CFLAGS_SL = -BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres - + +ifeq ($(BUNDLE), no) +DLSUFFIX = .dylib +BE_DLLLIBS= # Rule for building shared libs (currently used only for regression test # shlib ... should go away, since this is not really enough knowledge) %.so: %.o - $(CC) -bundle -o $@ $< $(BE_DLLLIBS) - + $(CC) -flat_namespace -dynamic -o $@ $< $(BE_DLLLIBS) +else +DLSUFFIX = .so +BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres +# Rule for building bundles (currently used only for regression test +# shlib ... should go away, since this is not really enough knowledge) +%.so: %.o + $(CC) -flat_namespace -dynamic -o $@ $< $(BE_DLLLIBS) +endif + sqlmansect = 7 diff -urN postgresql-7.4.2/src/template/darwin postgresql-7.4.2.new/src/template/darwin --- postgresql-7.4.2/src/template/darwin Fri Sep 19 21:47:59 2003 +++ postgresql-7.4.2.new/src/template/darwin Thu Apr 1 11:49:09 2004 @@ -4,3 +4,7 @@ # Select appropriate semaphore support USE_NAMED_POSIX_SEMAPHORES=1 + +THREAD_SUPPORT=yes +NEED_REENTRANT_FUNCS=no +