Bruno Haible <[EMAIL PROTECTED]> writes: > Martin Lambers wrote: >> Back in February, I suggested to add EX_OK to the sysexit module >> (http://lists.gnu.org/archive/html/bug-gnulib/2005-02/msg00042.html). >> Is there a reason not to do that? >> >> Regards, >> Martin >> >> >> --- sysexit_h.orig 2005-08-24 17:47:34.966600112 +0200 >> +++ sysexit_h 2005-08-24 17:47:51.731051528 +0200 >> @@ -20,6 +20,7 @@ >> #ifndef _SYSEXITS_H >> #define _SYSEXITS_H >> >> +#define EX_OK 0 >> #define EX_USAGE 64 >> #define EX_DATAERR 65 >> #define EX_NOINPUT 66 > > It sounds OK to do that; glibc's <sysexits.h> also defines EX_OK. > The only one that doesn't is apparently a private file inside 'postfix' - > irrelevant. > > But EX_OK is semantically the same as EXIT_SUCCESS. So what about this > patch?
Can't the sysexit.h file assume C89, and use EXIT_SUCCESS without requiring the exit module? It seems a somewhat complicated dependency for something everyone already know is 0. In fact, perhaps it would be simpler if the exit module defined EXIT_SUCCESS and EXIT_FAILURE in config.h, if they aren't defined, then no source code will have to be modified just to get C89 functionality. > *************** > *** 19,24 **** > --- 19,28 ---- > > #ifndef _SYSEXITS_H > #define _SYSEXITS_H > + > + #include "exit.h" > + > + #define EX_OK EXIT_SUCCESS > > #define EX_USAGE 64 > #define EX_DATAERR 65 > diff -c -3 -r1.5 sysexits > *** modules/sysexits 22 Jul 2005 22:04:12 -0000 1.5 > --- modules/sysexits 24 Aug 2005 16:40:41 -0000 > *************** > *** 6,11 **** > --- 6,12 ---- > m4/sysexits.m4 > > Depends-on: > + exit > > configure.ac: > gl_SYSEXITS _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib