changeset 8399:b6e248728b1a

* lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in spite of platforms like Tandem/NSK that define it to -1.
author Eric Blake <ebb9@byu.net>
date Fri, 09 Mar 2007 23:34:42 +0000
parents 8bb5ae6b5f90
children 655fca11a0e6
files ChangeLog lib/stdlib_.h
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-09  Eric Blake  <ebb9@byu.net>
+
+	* 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  <bruno@clisp.org>
 
 	* modules/vprintf-posix-tests: New file.
--- 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