summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2005-01-25 05:21:53 +0000
committertv <tv@pkgsrc.org>2005-01-25 05:21:53 +0000
commitf55888ad1b0716ef375067d6af97800c11637a89 (patch)
tree78b6881b5760fa2ba52e4588c3fa8705c231474d /databases
parent6ba698c58f4b9f4f18aaae49e38a13e0fae93ab1 (diff)
downloadpkgsrc-f55888ad1b0716ef375067d6af97800c11637a89.tar.gz
First attempt to provide a dynloader backend implementation for Interix,
using libltdl. (This could provide even more portability in the future.)
Diffstat (limited to 'databases')
-rw-r--r--databases/postgresql74/Makefile.common15
-rw-r--r--databases/postgresql74/files/dynloader-ltdl.h15
2 files changed, 29 insertions, 1 deletions
diff --git a/databases/postgresql74/Makefile.common b/databases/postgresql74/Makefile.common
index 99e0d26be95..66d8e704678 100644
--- a/databases/postgresql74/Makefile.common
+++ b/databases/postgresql74/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.17 2005/01/21 03:15:52 tv Exp $
+# $NetBSD: Makefile.common,v 1.18 2005/01/25 05:21:53 tv Exp $
#
# This Makefile fragment is included by all PostgreSQL packages built from
# the main sources of the PostgreSQL distribution except jdbc-postgresql.
@@ -100,6 +100,14 @@ post-extract:
${WRKSRC}/src/template/${platform}; \
fi
.endfor
+.for platform in interix3
+ if [ -d ${WRKSRC}/src/backend/port/dynloader ]; then \
+ ${RM} -f ${WRKSRC}/src/backend/port/dynloader/${platform}.h; \
+ ${CP} -f ${COMMON_FILESDIR}/dynloader-ltdl.h \
+ ${WRKSRC}/src/backend/port/dynloader/${platform}.h; \
+ ${TOUCH} ${WRKSRC}/src/backend/port/dynloader/${platform}.c; \
+ fi
+.endfor
if [ -d ${WRKSRC}/src/interfaces/libpq ]; then \
${RM} -f ${WRKSRC}/src/interfaces/libpq/GNUmakefile; \
${CP} -f ${COMMON_FILESDIR}/GNUmakefile.libpq \
@@ -116,5 +124,10 @@ post-extract:
${WRKSRC}/src/backend/port/dynloader/; \
fi
+.if ${OPSYS} == "Interix"
+. include "../../devel/libltdl/buildlink3.mk"
+LIBS+= -lltdl
+.endif
+
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
diff --git a/databases/postgresql74/files/dynloader-ltdl.h b/databases/postgresql74/files/dynloader-ltdl.h
new file mode 100644
index 00000000000..01b1fd31888
--- /dev/null
+++ b/databases/postgresql74/files/dynloader-ltdl.h
@@ -0,0 +1,15 @@
+/*
+ * dynamic loader based on libltdl
+ */
+#ifndef PORT_PROTOS_H
+#define PORT_PROTOS_H
+
+#include <ltdl.h>
+#include "utils/dynamic_loader.h"
+
+#define pg_dlopen(a) ((void *)lt_dlopen(a))
+#define pg_dlsym(a,b) lt_dlsym((lt_dlhandle)(a), (b))
+#define pg_dlclose(a) lt_dlclose((lt_dlhandle)(a))
+#define pg_dlerror lt_dlerror
+
+#endif /* PORT_PROTOS_H */