summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq
diff options
context:
space:
mode:
authorBruce Momjian2001-09-06 02:54:56 +0000
committerBruce Momjian2001-09-06 02:54:56 +0000
commit37c0b648759bb24ebf17831abc35533f356be7c4 (patch)
treedc20fde37f37ac39b0067311c4b669f0d62befee /src/interfaces/libpq
parentee0ef05b8d9b22e5c7f62cb92b54fc9acc26357d (diff)
Below is the patch against current cvs for libpgtcl and
two additional files win32.mak and libpgtcl.def. This patch allows to compile libpgtcl.dll on Windows with tcl > 8.0. I've tested it on WinNT (VC6.0), SUSE Linux (7.0) and Solaris 2.6 with tcl 8.3.3. Mikhail Terekhov
Diffstat (limited to 'src/interfaces/libpq')
-rw-r--r--src/interfaces/libpq/fe-exec.c16
-rw-r--r--src/interfaces/libpq/libpq-fe.h3
-rw-r--r--src/interfaces/libpq/libpqdll.def2
3 files changed, 18 insertions, 3 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index d02b74490e7..4b67bdcf52a 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.108 2001/08/21 20:39:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.109 2001/09/06 02:54:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1346,6 +1346,20 @@ PQnotifies(PGconn *conn)
}
/*
+ * PQfreeNotify - free's the memory associated with a PGnotify
+ *
+ * This function is needed on Windows when using libpq.dll and
+ * for example libpgtcl.dll: All memory allocated inside a dll
+ * should be freed in the context of the same dll.
+ *
+ */
+void
+PQfreeNotify(PGnotify *notify)
+{
+ free(notify);
+}
+
+/*
* PQgetline - gets a newline-terminated string from the backend.
*
* Chiefly here so that applications can use "COPY <rel> to stdout"
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index 79166533e99..5faa576c087 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-fe.h,v 1.72 2001/08/21 20:39:54 momjian Exp $
+ * $Id: libpq-fe.h,v 1.73 2001/09/06 02:54:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -254,6 +254,7 @@ extern "C"
/* Simple synchronous query */
extern PGresult *PQexec(PGconn *conn, const char *query);
extern PGnotify *PQnotifies(PGconn *conn);
+ extern void PQfreeNotify(PGnotify *notify);
/* Interface for multiple-result or asynchronous queries */
extern int PQsendQuery(PGconn *conn, const char *query);
diff --git a/src/interfaces/libpq/libpqdll.def b/src/interfaces/libpq/libpqdll.def
index a8b24c96be8..059707f87ea 100644
--- a/src/interfaces/libpq/libpqdll.def
+++ b/src/interfaces/libpq/libpqdll.def
@@ -87,4 +87,4 @@ EXPORTS
PQresetStart @ 84
PQsetClientEncoding @ 85
PQsetnonblocking @ 86
-
+ PQfreeNotify @ 87