From: Eric Blake Date: Fri, 9 Mar 2007 23:34:42 +0000 (+0000) Subject: * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d195802a9212a70e81bafda52776abe75ab22e6f;p=pspp * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in spite of platforms like Tandem/NSK that define it to -1. --- diff --git a/ChangeLog b/ChangeLog index 4940bef4b8..fc237af4e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-09 Eric Blake + + * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in + spite of platforms like Tandem/NSK that define it to -1. + 2007-03-08 Bruno Haible * modules/vprintf-posix-tests: New file. diff --git a/lib/stdlib_.h b/lib/stdlib_.h index c5917ec25e..5d43203b7b 100644 --- a/lib/stdlib_.h +++ b/lib/stdlib_.h @@ -50,8 +50,13 @@ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif +/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere + with proper operation of xargs. */ #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 +#elif EXIT_FAILURE != 1 +# undef EXIT_FAILURE +# define EXIT_FAILURE 1 #endif