summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline/xmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/readline/xmalloc.c')
-rw-r--r--cmd-line-utils/readline/xmalloc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/cmd-line-utils/readline/xmalloc.c b/cmd-line-utils/readline/xmalloc.c
index 497936d3b43..8985d340d39 100644
--- a/cmd-line-utils/readline/xmalloc.c
+++ b/cmd-line-utils/readline/xmalloc.c
@@ -20,7 +20,9 @@
Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+#include <config.h>
+#endif
#include <stdio.h>
@@ -39,7 +41,8 @@
/* **************************************************************** */
static void
-memory_error_and_abort(const char *fname)
+memory_error_and_abort (fname)
+ char *fname;
{
fprintf (stderr, "%s: out of virtual memory\n", fname);
exit (2);
@@ -56,7 +59,7 @@ xmalloc (bytes)
temp = malloc (bytes);
if (temp == 0)
- memory_error_and_abort("xmalloc");
+ memory_error_and_abort ("xmalloc");
return (temp);
}
@@ -70,7 +73,7 @@ xrealloc (pointer, bytes)
temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
if (temp == 0)
- memory_error_and_abort("xrealloc");
+ memory_error_and_abort ("xrealloc");
return (temp);
}