Mercurial > hg > octave-lojdl > gnulib-hg
changeset 1544:d943e18c2782
[EXIT_FAILURE]: Define.
(get_version): Use EXIT_FAILURE as exit status rather than
hard-coding `2'. From François Pinard.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Tue, 10 Nov 1998 05:57:56 +0000 |
parents | dc76e940bfc6 |
children | 84951ef7a5ed |
files | lib/backupfile.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/backupfile.c +++ b/lib/backupfile.c @@ -97,6 +97,14 @@ # define REAL_DIR_ENTRY(dp) 1 #endif +/* The following test is to work around the gross typo in + systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE + is defined to 0, not 1. */ +#if !EXIT_FAILURE +# undef EXIT_FAILURE +# define EXIT_FAILURE 1 +#endif + /* The extension added to file names to produce a simple (as opposed to numbered) backup file name. */ const char *simple_backup_suffix = "~"; @@ -212,7 +220,7 @@ } #endif /* HAVE_DIR */ -static const char * const backup_args[] = +static const char *const backup_args[] = { "never", "simple", "nil", "existing", "t", "numbered", 0 }; @@ -236,7 +244,7 @@ if (i < 0) { invalid_arg ("version control type", version, i); - exit (2); + exit (EXIT_FAILURE); } return backup_types[i]; }