Skip to content
Snippets Groups Projects
Commit c4c194f1 authored by Tom Lane's avatar Tom Lane
Browse files

Fix unportable coding for FRONTEND case.

parent 267a8f82
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.23 2001/06/02 15:16:55 wieck Exp $ * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.24 2001/07/31 02:02:45 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
/* can be used in frontend or backend */ /* can be used in frontend or backend */
#ifdef FRONTEND #ifdef FRONTEND
#include "postgres_fe.h" #include "postgres_fe.h"
#include <sysexits.h>
/* No assert checks in frontend ... */ /* No assert checks in frontend ... */
#define Assert(condition) #define Assert(condition)
#else #else
...@@ -34,14 +33,14 @@ DLNewList(void) ...@@ -34,14 +33,14 @@ DLNewList(void)
l = (Dllist *) malloc(sizeof(Dllist)); l = (Dllist *) malloc(sizeof(Dllist));
if (l == NULL) if (l == NULL)
#ifdef FRONTEND
{ {
fprintf(stderr, "Memory exhausted in DLNewList"); #ifdef FRONTEND
exit(EX_UNAVAILABLE); fprintf(stderr, "Memory exhausted in DLNewList\n");
} exit(1);
#else #else
elog(ERROR, "Memory exhausted in DLNewList"); elog(ERROR, "Memory exhausted in DLNewList");
#endif #endif
}
l->dll_head = 0; l->dll_head = 0;
l->dll_tail = 0; l->dll_tail = 0;
...@@ -77,14 +76,14 @@ DLNewElem(void *val) ...@@ -77,14 +76,14 @@ DLNewElem(void *val)
e = (Dlelem *) malloc(sizeof(Dlelem)); e = (Dlelem *) malloc(sizeof(Dlelem));
if (e == NULL) if (e == NULL)
#ifdef FRONTEND
{ {
fprintf(stderr, "Memory exhausted in DLNewList"); #ifdef FRONTEND
exit(EX_UNAVAILABLE); fprintf(stderr, "Memory exhausted in DLNewElem\n");
} exit(1);
#else #else
elog(ERROR, "Memory exhausted in DLNewElem"); elog(ERROR, "Memory exhausted in DLNewElem");
#endif #endif
}
e->dle_next = 0; e->dle_next = 0;
e->dle_prev = 0; e->dle_prev = 0;
e->dle_val = val; e->dle_val = val;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment