From: Niels Möller Date: Tue, 4 Nov 2008 19:59:29 +0000 (+0100) Subject: (main): Avoid using gmp_fprintf, to stay compatible with gmp-3.1. X-Git-Tag: nettle_2.0_release_20090608~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=998ec60d697b20a6298ec805927abaa8d80e2d68;p=thirdparty%2Fnettle.git (main): Avoid using gmp_fprintf, to stay compatible with gmp-3.1. Rev: nettle/examples/next-prime.c:1.3 --- diff --git a/examples/next-prime.c b/examples/next-prime.c index 71463828..584835f4 100644 --- a/examples/next-prime.c +++ b/examples/next-prime.c @@ -145,9 +145,11 @@ main(int argc, char **argv) mpz_init(d); mpz_sub(d, p, n); - gmp_fprintf(stderr, "bit size: %lu, diff: %Zd, total time: %.3g s\n", - mpz_sizeinbase(p, 2), d, - (double)(end - start) / CLOCKS_PER_SEC); + /* Avoid using gmp_fprintf, to stay compatible with gmp-3.1. */ + fprintf(stderr, "bit size: %lu, diff: ", (unsigned long) mpz_sizeinbase(p, 2)); + mpz_out_str(stderr, 10, d); + fprintf(stderr, ", total time: %.3g s\n", + (double)(end - start) / CLOCKS_PER_SEC); } return EXIT_SUCCESS; }