pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/postgresql74 First attempt to provide a dynl...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/20cfc4ce02dd
branches:  trunk
changeset: 488128:20cfc4ce02dd
user:      tv <tv%pkgsrc.org@localhost>
date:      Tue Jan 25 05:21:53 2005 +0000

description:
First attempt to provide a dynloader backend implementation for Interix,
using libltdl.  (This could provide even more portability in the future.)

diffstat:

 databases/postgresql74/Makefile.common        |  15 ++++++++++++++-
 databases/postgresql74/files/dynloader-ltdl.h |  15 +++++++++++++++
 2 files changed, 29 insertions(+), 1 deletions(-)

diffs (54 lines):

diff -r 92816dbc2760 -r 20cfc4ce02dd databases/postgresql74/Makefile.common
--- a/databases/postgresql74/Makefile.common    Tue Jan 25 04:58:01 2005 +0000
+++ b/databases/postgresql74/Makefile.common    Tue Jan 25 05:21:53 2005 +0000
@@ -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 @@
                        ${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 @@
                        ${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 -r 92816dbc2760 -r 20cfc4ce02dd databases/postgresql74/files/dynloader-ltdl.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql74/files/dynloader-ltdl.h     Tue Jan 25 05:21:53 2005 +0000
@@ -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 */



Home | Main Index | Thread Index | Old Index