mini-gmp mpz_{get,set}_d not fully compatible with GMP

Niels Möller nisse at lysator.liu.se
Sat May 19 21:16:09 UTC 2018


"Marco Bodrato" <bodrato at mail.dm.unipi.it> writes:

> diff -r 41e50c4fdc46 bootstrap.c
> --- a/bootstrap.c       Wed May 16 08:36:03 2018 +0200
> +++ b/bootstrap.c       Fri May 18 07:24:52 2018 +0200
> @@ -29,6 +29,7 @@
>  see https://www.gnu.org/licenses/.  */
>
>
> +#define DONT_USE_FLOAT_H 1
>  #include "mini-gmp/mini-gmp.c"
>
>  #define MIN(l,o) ((l) < (o) ? (l) : (o))
> diff -r 41e50c4fdc46 mini-gmp/mini-gmp.c
> --- a/mini-gmp/mini-gmp.c       Wed May 16 08:36:03 2018 +0200
> +++ b/mini-gmp/mini-gmp.c       Fri May 18 07:24:52 2018 +0200
> @@ -50,6 +50,9 @@
>
>  #include "mini-gmp.h"
>
> +#if !defined(DONT_USE_FLOAT_H)
> +#include <float.h>
> +#endif

Makes sense to me, provided that the define also excludes whatever
mini-gmp functions depend on float.h (which would be get_d and set_d,
possibly cmp_d), and is named accordingly.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list