bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] sysexits.h: Define EX_OK


From: Bruno Haible
Subject: Re: [bug-gnulib] sysexits.h: Define EX_OK
Date: Wed, 24 Aug 2005 18:39:02 +0200
User-agent: KMail/1.5

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?

Bruno


diff -c -3 -r1.2 sysexit_.h
*** lib/sysexit_.h      14 May 2005 06:03:58 -0000      1.2
--- lib/sysexit_.h      24 Aug 2005 16:40:41 -0000
***************
*** 1,5 ****
  /* exit() exit codes for some BSD system programs.
!    Copyright (C) 2003 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,5 ----
  /* exit() exit codes for some BSD system programs.
!    Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
***************
*** 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]