  These are the changes I made to the standard xmalloc.c in order to
  remove the dependence on error.c.
    -- James Henstridge <james@daa.com.au>

--- xmalloc.c.orig	Fri Sep 26 12:01:45 1997
+++ xmalloc.c	Fri Sep 26 12:01:07 1997
@@ -28,8 +28,10 @@
 #include <sys/types.h>
 
 #if STDC_HEADERS
+#include <stdio.h>
 #include <stdlib.h>
 #else
+int printf ();
 VOID *malloc ();
 VOID *realloc ();
 void free ();
@@ -43,11 +45,13 @@
    The caller may set it to some other value.  */
 int xmalloc_exit_failure = EXIT_FAILURE;
 
+/*
 #if __STDC__ && (HAVE_VPRINTF || HAVE_DOPRNT)
 void error (int, int, const char *, ...);
 #else
 void error ();
 #endif
+*/
 
 static VOID *
 fixup_null_alloc (n)
@@ -59,7 +63,9 @@
   if (n == 0)
     p = malloc ((size_t) 1);
   if (p == 0)
-    error (xmalloc_exit_failure, 0, "memory exhausted");
+    /* error (xmalloc_exit_failure, 0, "memory exhausted"); */
+    /* change by James Henstridge <james@daa.com.au> for www-sql */
+    {printf("malloc: memory exhausted\n");exit;}
   return p;
 }
 
