mini-gmp

paul zimmermann Paul.Zimmermann at inria.fr
Wed Dec 6 20:00:55 UTC 2017


       Dear Niels,

> We could add some documented macro for this purpse, but I'm not sure I
> understand why you need it.

for example, we check the version of GMP is at least 5.0.0:

#if !__MPFR_GMP(5,0,0)
# error "GMP 5.0.0 or newer is required"
#endif

where the __MPFR_GMP macro uses __GNU_MP_VERSION, ...

Since mini-gmp does not provide any version macro, we can't check
the version of mini-gmp is good enough.

> And then I have a couple of #if NETTLE_USE_MINI_GMP spread out in the
> rest of the code.

same in MPFR:

$ grep MPFR_USE_MINI_GMP src/*.[ch] tests/*.[ch] | wc -l
47

> > and finally mpz_dump.
> 
> Hmm. It seems this function is declared in gmp.h, but not mentioned in
> the manual, and with a discouraging comment at the top of mpz/dump.c.
> 
> Any reason you can't switch to always use mpz_out_str instead?

in fact it seems we no longer need this function in MPFR.

Thanks!
Paul


More information about the gmp-devel mailing list