summaryrefslogtreecommitdiff
path: root/lib/xmalloc.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-09-13 10:23:46 +0000
committerJim Meyering <jim@meyering.net>2003-09-13 10:23:46 +0000
commit63056397664c980f7035bd152008dadb05bcd392 (patch)
treebfc2cd0d9cf7d7cb01561da4f6e74d84f0511979 /lib/xmalloc.c
parentea2c919bf2eda93033d3730681c63fa4fdff91ca (diff)
downloadcoreutils-63056397664c980f7035bd152008dadb05bcd392.tar.xz
Include "xalloc.h" first, to check interface.
Include <stdlib.h> unconditionally. Include exit.h. (EXIT_FAILURE): Remove; now done by exit.h
Diffstat (limited to 'lib/xmalloc.c')
-rw-r--r--lib/xmalloc.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index ead50393d..3adf5dda8 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -21,28 +21,17 @@
# include <config.h>
#endif
-#include <sys/types.h>
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#else
-void *calloc ();
-void *malloc ();
-void *realloc ();
-void free ();
-#endif
+#include "xalloc.h"
+
+#include <stdlib.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
#include "error.h"
+#include "exit.h"
#include "exitfail.h"
-#include "xalloc.h"
-
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
/* The following tests require AC_PREREQ(2.54). */