Mercurial > hg > octave-nkf > gnulib-hg
changeset 4696:4753d416bf20
Use "exit.h" rather than rolling EXIT_FAILURE ourselves in each module.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 12 Sep 2003 20:14:10 +0000 |
parents | 4cd5b2420ecf |
children | 73c2577c2864 |
files | 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 |
diffstat | 11 files changed, 19 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/argmatch.c +++ b/lib/argmatch.c @@ -35,6 +35,7 @@ #define _(msgid) gettext (msgid) #include "error.h" +#include "exit.h" #include "quotearg.h" #include "quote.h" #include "unlocked-io.h" @@ -46,10 +47,6 @@ # 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)
--- a/lib/exitfail.c +++ b/lib/exitfail.c @@ -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;
--- a/lib/fatal.c +++ b/lib/fatal.c @@ -20,10 +20,9 @@ # include <config.h> #endif -/* FIXME: define EXIT_FAILURE */ - #include "fatal.h" +#include "exit.h" #include <stdarg.h> #include <stdio.h> #include <stdlib.h>
--- a/lib/obstack.c +++ b/lib/obstack.c @@ -82,8 +82,8 @@ /* 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;
--- a/lib/xgethostname.c +++ b/lib/xgethostname.c @@ -30,16 +30,13 @@ #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
--- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -30,12 +30,9 @@ #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
--- a/modules/argmatch +++ b/modules/argmatch @@ -6,10 +6,11 @@ lib/argmatch.c Depends-on: +error +exit gettext -error +quote quotearg -quote unlocked-io configure.ac:
--- a/modules/exitfail +++ b/modules/exitfail @@ -7,6 +7,7 @@ m4/exitfail.m4 Depends-on: +exit configure.ac: gl_EXITFAIL
--- a/modules/obstack +++ b/modules/obstack @@ -7,6 +7,7 @@ m4/obstack.m4 Depends-on: +exit gettext configure.ac: