summaryrefslogtreecommitdiff
path: root/lib/argmatch.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-16 15:17:48 +0000
committerJim Meyering <jim@meyering.net>1999-01-16 15:17:48 +0000
commite42efa6866fd05a9f3d7ff430bc072721373bac8 (patch)
treefbeae8a3cb353b98fed0135ed1673bcc1eca4273 /lib/argmatch.c
parent115a5d0e61663d977612aab4903d593729202c02 (diff)
downloadcoreutils-e42efa6866fd05a9f3d7ff430bc072721373bac8.tar.xz
(EXIT_FAILURE): Define.
(ARGMATCH_DIE): Use it.
Diffstat (limited to 'lib/argmatch.c')
-rw-r--r--lib/argmatch.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/argmatch.c b/lib/argmatch.c
index 19d5aa497..6ae76ac1b 100644
--- a/lib/argmatch.c
+++ b/lib/argmatch.c
@@ -48,9 +48,17 @@
extern char *program_name;
+/* 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
+
/* Non failing version of argmatch call this function after failing. */
#ifndef ARGMATCH_DIE
-# define ARGMATCH_DIE exit (2)
+# define ARGMATCH_DIE exit (EXIT_FAILURE)
#endif
static void