On Wed, Aug 13, 2008 at 9:20 AM, Jim Meyering <[EMAIL PROTECTED]> wrote:
> I assumed that "expr --bignum 1" would exit nonzero when
> gmp support was not available.
>
> James, any objection to this change?
>
> From 38050c05b59b71f3103b8ad36337cd2d216e1fa7 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <[EMAIL PROTECTED]>
> Date: Wed, 13 Aug 2008 09:58:47 +0200
> Subject: [PATCH] "expr --bignum 1" now fails when expr built without libgmp
>
> * src/expr.c (main): When --bignum is requested, yet expr was built
> without libgmp, exit nonzero (3) in addition to giving a diagnostic.
> ---
>  src/expr.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/expr.c b/src/expr.c
> index 524ec93..dc41616 100644
> --- a/src/expr.c
> +++ b/src/expr.c
> @@ -292,7 +292,8 @@ main (int argc, char **argv)
>  #if HAVE_GMP
>            mode = MP_ALWAYS;
>  #else
> -           error (0, 0, _("arbitrary-precision support is not available"));
> +           error (EXPR_FAILURE, 0,
> +                  _("arbitrary-precision support is not available"));
>  #endif
>            break;
>
> --
> 1.6.0.rc2.38.g413e06
>

No objection at all.   I should have written that in the first place.

James.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to