Use "exit.h" rather than rolling EXIT_FAILURE ourselves in each module.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 Sep 2003 20:14:10 +0000 (20:14 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 Sep 2003 20:14:10 +0000 (20:14 +0000)
lib/argmatch.c
lib/exitfail.c
lib/fatal.c
lib/obstack.c
lib/xgethostname.c
lib/xmalloc.c
modules/argmatch
modules/exitfail
modules/obstack
modules/xalloc
modules/xgethostname

index 345256af602b8e9011c616dd85dec0d4482b30fd..972a085e9b0dccf96d162e04549bee3470f6e530 100644 (file)
@@ -35,6 +35,7 @@
 #define _(msgid) gettext (msgid)
 
 #include "error.h"
+#include "exit.h"
 #include "quotearg.h"
 #include "quote.h"
 #include "unlocked-io.h"
 # define ARGMATCH_QUOTING_STYLE locale_quoting_style
 #endif
 
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
 /* Non failing version of argmatch call this function after failing. */
 #ifndef ARGMATCH_DIE
 # define ARGMATCH_DIE exit (EXIT_FAILURE)
index 3668853bd844a0047741180017f6385c1e6bc3fc..2ae5f69555f466bba313d0d909ed00a819bc97d7 100644 (file)
@@ -21,9 +21,7 @@
 # include <config.h>
 #endif
 
-#include <stdlib.h>
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
+#include "exitfail.h"
+#include "exit.h"
 
 int volatile exit_failure = EXIT_FAILURE;
index 8bcc3c56183eb220ead1c59b3fe82afe222aaaf4..79e8a346e0ba3c10fc17e22cf10f16fa99a34c8e 100644 (file)
 # include <config.h>
 #endif
 
-/* FIXME: define EXIT_FAILURE */
-
 #include "fatal.h"
 
+#include "exit.h"
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
index 705c65d4aab07bafd847ec6fd046d0176d9d57a3..bf6bba86c1d2fd6b18f7755fb09a3ba1d134e1cb 100644 (file)
@@ -82,8 +82,8 @@ void (*obstack_alloc_failed_handler) (void) = print_and_abort;
 
 /* Exit value used when `print_and_abort' is used.  */
 # include <stdlib.h>
-# ifndef EXIT_FAILURE
-#  define EXIT_FAILURE 1
+# ifndef _LIBC
+#  include "exit.h"
 # endif
 int obstack_exit_failure = EXIT_FAILURE;
 
index c0939945bb635520b17e17faed19b0b05535ca03..494571ee1d8e4381fb88dcb07946f0cdabd3260b 100644 (file)
@@ -30,16 +30,13 @@ extern int errno;
 #endif
 
 #include "error.h"
+#include "exit.h"
 #include "xalloc.h"
 
 #ifndef ENAMETOOLONG
 # define ENAMETOOLONG 9999
 #endif
 
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
 int gethostname ();
 
 #ifndef INITIAL_HOSTNAME_LENGTH
index 82980ea58ce32e7ff50aa35b3a13f5e343bcba52..3adf5dda88f1c4f74683d2860d9d2e283775c8c7 100644 (file)
 #define N_(msgid) msgid
 
 #include "error.h"
+#include "exit.h"
 #include "exitfail.h"
 
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
 /* The following tests require AC_PREREQ(2.54).  */
 
 #ifndef HAVE_MALLOC
index 9f99899d545c0b12e27a071d4314f6d0ad3545f4..8a1ed6d7ef7b3f323968acd83d1ca36420e384d9 100644 (file)
@@ -6,10 +6,11 @@ lib/argmatch.h
 lib/argmatch.c
 
 Depends-on:
-gettext
 error
-quotearg
+exit
+gettext
 quote
+quotearg
 unlocked-io
 
 configure.ac:
index 58367d5b67f637d46bc8d32d2b932aa42b140138..67e82db311d7c81dbf21271cada8cf232169fd90 100644 (file)
@@ -7,6 +7,7 @@ lib/exitfail.c
 m4/exitfail.m4
 
 Depends-on:
+exit
 
 configure.ac:
 gl_EXITFAIL
index 5937751ab4accde8d22444d51e86f99aa5501b2a..acec7c112e5284c3a03a2e4f731c1116f21b7781 100644 (file)
@@ -7,6 +7,7 @@ lib/obstack.c
 m4/obstack.m4
 
 Depends-on:
+exit
 gettext
 
 configure.ac:
index 6c133a3c274c557e25ba4722a9058f2c9bd8cbfc..7e3321b348b11f0b239753622aa889a333d0e0de 100644 (file)
@@ -8,11 +8,12 @@ lib/xstrdup.c
 m4/xalloc.m4
 
 Depends-on:
-malloc
-realloc
 error
-gettext
+exit
 exitfail
+gettext
+malloc
+realloc
 
 configure.ac:
 gl_XALLOC
index 659ae55ee64ca69597463fd2d543f48425c0d2d5..ab08d898a7bfd6245bfceb8607ca0fa2555d5f91 100644 (file)
@@ -5,9 +5,10 @@ Files:
 lib/xgethostname.c
 
 Depends-on:
+error
+exit
 gethostname
 xalloc
-error
 
 configure.ac: