#
# 'make install' installs whole contents of src/include.
#
-# $PostgreSQL: pgsql/src/include/Makefile,v 1.14 2004/10/07 16:23:28 momjian Exp $
+# $PostgreSQL: pgsql/src/include/Makefile,v 1.15 2004/10/16 22:52:39 tgl Exp $
#
#-------------------------------------------------------------------------
$(INSTALL_DATA) $(srcdir)/port.h $(DESTDIR)$(includedir_internal)
$(INSTALL_DATA) $(srcdir)/postgres_fe.h $(DESTDIR)$(includedir_internal)
$(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h $(DESTDIR)$(includedir_internal)/libpq
- $(INSTALL_DATA) $(srcdir)/lib/dllist.h $(DESTDIR)$(includedir_internal)/lib
# These headers are needed for server-side development
$(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir_server)
$(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
uninstall:
rm -f $(addprefix $(DESTDIR)$(includedir)/, pg_config.h pg_config_os.h postgres_ext.h libpq/libpq-fs.h)
- rm -f $(addprefix $(DESTDIR)$(includedir_internal)/, c.h postgres_fe.h lib/dllist.h libpq/pqcomm.h)
+ rm -f $(addprefix $(DESTDIR)$(includedir_internal)/, c.h postgres_fe.h libpq/pqcomm.h)
# heuristic...
rm -rf $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS) *.h)
# Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.119 2004/10/16 20:10:56 tgl Exp $
+# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.120 2004/10/16 22:52:49 tgl Exp $
#
#-------------------------------------------------------------------------
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o \
- dllist.o md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o thread.o \
+ md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o thread.o \
$(filter crypt.o getaddrinfo.o inet_aton.o open.o snprintf.o strerror.o, $(LIBOBJS))
ifeq ($(PORTNAME), win32)
md5.c ip.c: % : $(backend_src)/libpq/%
rm -f $@ && $(LN_S) $< .
-dllist.c: $(backend_src)/lib/dllist.c
- rm -f $@ && $(LN_S) $< .
-
encnames.c wchar.c : % : $(backend_src)/utils/mb/%
rm -f $@ && $(LN_S) $< .
rm -f $(DESTDIR)$(includedir)/libpq-fe.h $(DESTDIR)$(includedir_internal)/libpq-int.h $(DESTDIR)$(includedir_internal)/pqexpbuffer.h
clean distclean: clean-lib
- rm -f $(OBJS) crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c thread.c dllist.c md5.c ip.c encnames.c wchar.c pthread.h
+ rm -f $(OBJS) crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c thread.c md5.c ip.c encnames.c wchar.c pthread.h
maintainer-clean: distclean
rm -f $(srcdir)/libpqdll.def $(srcdir)/libpqddll.def $(srcdir)/blibpqdll.def
"$(INTDIR)\crypt.obj" \
"$(INTDIR)\noblock.obj" \
"$(INTDIR)\pgstrcasecmp.obj" \
- "$(INTDIR)\dllist.obj" \
"$(INTDIR)\md5.obj" \
"$(INTDIR)\ip.obj" \
"$(INTDIR)\fe-auth.obj" \
-@erase "$(INTDIR)\thread.obj"
-@erase "$(INTDIR)\inet_aton.obj"
-@erase "$(INTDIR)\crypt.obj"
- -@erase "$(INTDIR)\dllist.obj"
-@erase "$(INTDIR)\md5.obj"
-@erase "$(INTDIR)\ip.obj"
-@erase "$(INTDIR)\fe-auth.obj"
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.284 2004/08/29 05:07:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.285 2004/10/16 22:52:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
conn->setenv_state = SETENV_STATE_IDLE;
conn->client_encoding = PG_SQL_ASCII;
conn->verbosity = PQERRORS_DEFAULT;
- conn->notifyList = DLNewList();
conn->sock = -1;
#ifdef USE_SSL
conn->allow_ssl_try = true;
static void
freePGconn(PGconn *conn)
{
+ PGnotify *notify;
pgParameterStatus *pstatus;
if (!conn)
if (conn->sslmode)
free(conn->sslmode);
/* Note that conn->Pfdebug is not ours to close or free */
- if (conn->notifyList)
- DLFreeList(conn->notifyList);
+ notify = conn->notifyHead;
+ while (notify != NULL)
+ {
+ PGnotify *prev = notify;
+
+ notify = notify->next;
+ free(prev);
+ }
freeaddrinfo_all(conn->addrlist_family, conn->addrlist);
pstatus = conn->pstatus;
while (pstatus != NULL)
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.162 2004/08/30 02:54:41 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.163 2004/10/16 22:52:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
PGnotify *
PQnotifies(PGconn *conn)
{
- Dlelem *e;
PGnotify *event;
if (!conn)
/* Parse any available data to see if we can extract NOTIFY messages. */
parseInput(conn);
- /* RemHead returns NULL if list is empty */
- e = DLRemHead(conn->notifyList);
- if (!e)
- return NULL;
- event = (PGnotify *) DLE_VAL(e);
- DLFreeElem(e);
+ event = conn->notifyHead;
+ if (event)
+ {
+ conn->notifyHead = event->next;
+ if (!conn->notifyHead)
+ conn->notifyTail = NULL;
+ event->next = NULL; /* don't let app see the internal state */
+ }
return event;
}
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.14 2004/08/30 02:54:41 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.15 2004/10/16 22:52:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/* fake up an empty-string extra field */
newNotify->extra = newNotify->relname + nmlen;
newNotify->be_pid = be_pid;
- DLAddTail(conn->notifyList, DLNewElem(newNotify));
+ newNotify->next = NULL;
+ if (conn->notifyTail)
+ conn->notifyTail->next = newNotify;
+ else
+ conn->notifyHead = newNotify;
+ conn->notifyTail = newNotify;
}
return 0;
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol3.c,v 1.17 2004/10/12 21:54:45 petere Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol3.c,v 1.18 2004/10/16 22:52:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
newNotify->extra = newNotify->relname + nmlen + 1;
strcpy(newNotify->extra, conn->workBuffer.data);
newNotify->be_pid = be_pid;
- DLAddTail(conn->notifyList, DLNewElem(newNotify));
+ newNotify->next = NULL;
+ if (conn->notifyTail)
+ conn->notifyTail->next = newNotify;
+ else
+ conn->notifyHead = newNotify;
+ conn->notifyTail = newNotify;
}
free(svname);
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.110 2004/10/16 03:26:43 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.111 2004/10/16 22:52:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
char *relname; /* notification condition name */
int be_pid; /* process ID of server process */
char *extra; /* notification parameter */
+ /* Fields below here are private to libpq; apps should not use 'em */
+ struct pgNotify *next; /* list link */
} PGnotify;
/* Function types for notice-handling callbacks */
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.93 2004/10/05 15:09:41 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.94 2004/10/16 22:52:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/* include stuff common to fe and be */
#include "getaddrinfo.h"
#include "libpq/pqcomm.h"
-#include "lib/dllist.h"
/* include stuff found in fe only */
#include "pqexpbuffer.h"
char copy_is_binary; /* 1 = copy binary, 0 = copy text */
int copy_already_done; /* # bytes already returned in
* COPY OUT */
- Dllist *notifyList; /* Notify msgs not yet handed to
- * application */
+ PGnotify *notifyHead; /* oldest unreported Notify msg */
+ PGnotify *notifyTail; /* newest unreported Notify msg */
/* Connection data */
int sock; /* Unix FD for socket, -1 if not connected */
-@erase "$(INTDIR)\inet_aton.obj"
-@erase "$(INTDIR)\crypt.obj"
-@erase "$(INTDIR)\noblock.obj"
- -@erase "$(INTDIR)\dllist.obj"
-@erase "$(INTDIR)\md5.obj"
-@erase "$(INTDIR)\ip.obj"
-@erase "$(INTDIR)\fe-auth.obj"
"$(INTDIR)\inet_aton.obj" \
"$(INTDIR)\crypt.obj" \
"$(INTDIR)\noblock.obj" \
- "$(INTDIR)\dllist.obj" \
"$(INTDIR)\md5.obj" \
"$(INTDIR)\ip.obj" \
"$(INTDIR)\fe-auth.obj" \
$(CPP_PROJ) ..\..\port\noblock.c
<<
-"$(INTDIR)\dllist.obj" : ..\..\backend\lib\dllist.c
- $(CPP) @<<
- $(CPP_PROJ) ..\..\backend\lib\dllist.c
-<<
-
-
"$(INTDIR)\md5.obj" : ..\..\backend\libpq\md5.c
$(CPP) @<<
$(CPP_PROJ) ..\..\backend\libpq\md5.c