summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorHartmut Becker <becker.ismaning@freenet.de>2014-08-24 22:06:15 +0200
committerPaul Smith <psmith@gnu.org>2014-09-07 17:41:59 -0400
commit8de07f3e4a67fa1c9bd5293d183090ad08b7be6f (patch)
tree2214e65558248378dad06d192b14bbd051e38367 /main.c
parentf970315766906ed789656d87720328b5513e5942 (diff)
downloadgunmake-8de07f3e4a67fa1c9bd5293d183090ad08b7be6f.tar.gz
Enhance/fix VMS exit code handling.
* commands.c, function.c, hash.c, job.c, main.c, output.c: use MAKE exit codes. * makeint.h: encode make exit codes so that they are VMS compatible. * job.c: check child exit code for VMS style exit codes. * vmsjobs.c: save and return VMS style exit code.
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index 0508ae1..2e654db 100644
--- a/main.c
+++ b/main.c
@@ -1434,7 +1434,7 @@ main (int argc, char **argv, char **envp)
if (print_version_flag)
{
print_version ();
- die (0);
+ die (MAKE_SUCCESS);
}
if (ISDB (DB_BASIC))
@@ -2254,7 +2254,7 @@ main (int argc, char **argv, char **envp)
if (any_remade)
goto re_exec;
if (any_failed)
- die (2);
+ die (MAKE_FAILURE);
break;
}
@@ -2529,7 +2529,7 @@ main (int argc, char **argv, char **envp)
}
/* NOTREACHED */
- exit (0);
+ exit (MAKE_SUCCESS);
}
/* Parsing of arguments, decoding of switches. */
@@ -2894,7 +2894,7 @@ decode_switches (int argc, const char **argv, int env)
if (!env && (bad || print_usage_flag))
{
print_usage (bad);
- die (bad ? 2 : 0);
+ die (bad ? MAKE_FAILURE : MAKE_SUCCESS);
}
/* If there are any options that need to be decoded do it now. */