diff options
author | Jan Wieck <JanWieck@Yahoo.com> | 2001-06-02 15:16:55 +0000 |
---|---|---|
committer | Jan Wieck <JanWieck@Yahoo.com> | 2001-06-02 15:16:55 +0000 |
commit | fc7c16fd16747f2d3e56777a923262233d36f07a (patch) | |
tree | e0ce52fbab76df710a4b6ee5ee7ffbf1efe31ce2 | |
parent | c9445f08826b37d9acbc82adc77a578deaa8eff9 (diff) | |
download | postgresql-fc7c16fd16747f2d3e56777a923262233d36f07a.tar.gz postgresql-fc7c16fd16747f2d3e56777a923262233d36f07a.zip |
dllist.c is included in the frontend libpq interface via symlink.
There is no elog() available. Used fprintf(stderr, ...) and exit
instead.
Jan
-rw-r--r-- | src/backend/lib/dllist.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/backend/lib/dllist.c b/src/backend/lib/dllist.c index 6f88bfea257..08e6ddb364f 100644 --- a/src/backend/lib/dllist.c +++ b/src/backend/lib/dllist.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.22 2001/06/01 19:54:58 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.23 2001/06/02 15:16:55 wieck Exp $ * *------------------------------------------------------------------------- */ @@ -17,6 +17,7 @@ /* can be used in frontend or backend */ #ifdef FRONTEND #include "postgres_fe.h" +#include <sysexits.h> /* No assert checks in frontend ... */ #define Assert(condition) #else @@ -33,7 +34,14 @@ DLNewList(void) l = (Dllist *) malloc(sizeof(Dllist)); if (l == NULL) +#ifdef FRONTEND + { + fprintf(stderr, "Memory exhausted in DLNewList"); + exit(EX_UNAVAILABLE); + } +#else elog(ERROR, "Memory exhausted in DLNewList"); +#endif l->dll_head = 0; l->dll_tail = 0; @@ -69,7 +77,14 @@ DLNewElem(void *val) e = (Dlelem *) malloc(sizeof(Dlelem)); if (e == NULL) +#ifdef FRONTEND + { + fprintf(stderr, "Memory exhausted in DLNewList"); + exit(EX_UNAVAILABLE); + } +#else elog(ERROR, "Memory exhausted in DLNewElem"); +#endif e->dle_next = 0; e->dle_prev = 0; e->dle_val = val; |