diff options
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h index e73524e..589e344 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -119,6 +119,25 @@ extern int errno; #endif #endif +/* If we don't have an overriding definition, set SUCCESS_EXIT_CODE and + FATAL_EXIT_CODE to EXIT_SUCCESS and EXIT_FAILURE respectively, + or 0 and 1 if those macros are not defined. */ +#ifndef SUCCESS_EXIT_CODE +# ifdef EXIT_SUCCESS +# define SUCCESS_EXIT_CODE EXIT_SUCCESS +# else +# define SUCCESS_EXIT_CODE 0 +# endif +#endif + +#ifndef FATAL_EXIT_CODE +# ifdef EXIT_FAILURE +# define FATAL_EXIT_CODE EXIT_FAILURE +# else +# define FATAL_EXIT_CODE 1 +# endif +#endif + #ifdef HAVE_UNISTD_H # include <unistd.h> #endif |