summaryrefslogtreecommitdiff
path: root/lib/backupfile.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-11-10 05:57:56 +0000
committerJim Meyering <jim@meyering.net>1998-11-10 05:57:56 +0000
commit95b7d7b9ddf02f9dee432106a630730de92c76b4 (patch)
treec3e842a6c34b4c27e4c6663aab531de21fa90a32 /lib/backupfile.c
parent2c87951537411c676efd23cae118f42c2fba0e8d (diff)
downloadgnulib-95b7d7b9ddf02f9dee432106a630730de92c76b4.tar.gz
[EXIT_FAILURE]: Define.
(get_version): Use EXIT_FAILURE as exit status rather than hard-coding `2'. From François Pinard.
Diffstat (limited to 'lib/backupfile.c')
-rw-r--r--lib/backupfile.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/backupfile.c b/lib/backupfile.c
index a1b05a1233..a22a7f235e 100644
--- a/lib/backupfile.c
+++ b/lib/backupfile.c
@@ -97,6 +97,14 @@ char *malloc ();
# 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 @@ version_number (const char *base, const char *backup, size_t base_length)
}
#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 @@ get_version (const char *version)
if (i < 0)
{
invalid_arg ("version control type", version, i);
- exit (2);
+ exit (EXIT_FAILURE);
}
return backup_types[i];
}