"expr --bignum 1" now fails when expr is built without libgmp
authorJim Meyering <meyering@redhat.com>
Wed, 13 Aug 2008 07:58:47 +0000 (09:58 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 14 Aug 2008 12:37:49 +0000 (14:37 +0200)
* 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

index 524ec93..dc41616 100644 (file)
@@ -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;