Ralf Wildenhues <[EMAIL PROTECTED]> wrote:
> FAIL: misc/expr.log (exit: 1)
> =============================
...
> fail-c...
> bignum-add...
> expr: test bignum-add failed: exit status mismatch: expected 0, got 3
> bignum-add2...
> expr: test bignum-add2 failed: exit status mismatch: expected 0, got 3
> bignum-sub...
> expr: test bignum-sub failed: exit status mismatch: expected 0, got 3
> bignum-sub2...
> expr: test bignum-sub2 failed: exit status mismatch: expected 0, got 3
> bignum-mul...
> expr: test bignum-mul failed: exit status mismatch: expected 0, got 3
> bignum-div...
> expr: test bignum-div failed: exit status mismatch: expected 0, got 3
This is due to my false assumption and a simulate-without-gmp test
procedure that didn't simulate well enough.
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
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils