Skip to content

Commit c4c194f

Browse files
committed
Fix unportable coding for FRONTEND case.
1 parent 267a8f8 commit c4c194f

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/backend/lib/dllist.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.23 2001/06/02 15:16:55 wieck Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.24 2001/07/31 02:02:45 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
1616

1717
/* can be used in frontend or backend */
1818
#ifdef FRONTEND
1919
#include "postgres_fe.h"
20-
#include <sysexits.h>
2120
/* No assert checks in frontend ... */
2221
#define Assert(condition)
2322
#else
@@ -34,14 +33,14 @@ DLNewList(void)
3433

3534
l = (Dllist *) malloc(sizeof(Dllist));
3635
if (l == NULL)
37-
#ifdef FRONTEND
3836
{
39-
fprintf(stderr, "Memory exhausted in DLNewList");
40-
exit(EX_UNAVAILABLE);
41-
}
37+
#ifdef FRONTEND
38+
fprintf(stderr, "Memory exhausted in DLNewList\n");
39+
exit(1);
4240
#else
4341
elog(ERROR, "Memory exhausted in DLNewList");
4442
#endif
43+
}
4544
l->dll_head = 0;
4645
l->dll_tail = 0;
4746

@@ -77,14 +76,14 @@ DLNewElem(void *val)
7776

7877
e = (Dlelem *) malloc(sizeof(Dlelem));
7978
if (e == NULL)
80-
#ifdef FRONTEND
8179
{
82-
fprintf(stderr, "Memory exhausted in DLNewList");
83-
exit(EX_UNAVAILABLE);
84-
}
80+
#ifdef FRONTEND
81+
fprintf(stderr, "Memory exhausted in DLNewElem\n");
82+
exit(1);
8583
#else
8684
elog(ERROR, "Memory exhausted in DLNewElem");
8785
#endif
86+
}
8887
e->dle_next = 0;
8988
e->dle_prev = 0;
9089
e->dle_val = val;

0 commit comments

Comments
 (0)