]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
autoupdate
authorKarl Berry <karl@freefriends.org>
Thu, 25 Sep 2025 14:44:28 +0000 (07:44 -0700)
committerKarl Berry <karl@freefriends.org>
Thu, 25 Sep 2025 14:44:28 +0000 (07:44 -0700)
lib/mini-gmp.c
lib/mini-mpq.c

index 62b97b854e667bde2be6817dda842577c8a42a6d..9f3812b31bdcfc3826bb778dae355aae8f4cfd8b 100644 (file)
@@ -51,7 +51,11 @@ see https://www.gnu.org/licenses/.  */
 
 #include "mini-gmp.h"
 
-#if !defined(MINI_GMP_DONT_USE_FLOAT_H)
+#ifndef MINI_GMP_ENABLE_FLOAT
+#define MINI_GMP_ENABLE_FLOAT 1
+#endif
+
+#if MINI_GMP_ENABLE_FLOAT
 #include <float.h>
 #endif
 
@@ -1705,6 +1709,7 @@ mpz_roinit_n (mpz_t x, mp_srcptr xp, mp_size_t xs)
 }
 
 \f
+#if MINI_GMP_ENABLE_FLOAT
 /* Conversions and comparison to double. */
 void
 mpz_set_d (mpz_t r, double x)
@@ -1861,6 +1866,7 @@ mpz_cmp_d (const mpz_t x, double d)
        return mpz_cmpabs_d (x, d);
     }
 }
+#endif /* MINI_GMP_ENABLE_FLOAT */
 
 \f
 /* MPZ comparisons and the like. */
index 58ce37f1d247a981c3f6703ce0a09857fba78499..db318df133efade5a535b44a707bfbf410b746ec 100644 (file)
@@ -41,6 +41,10 @@ see https://www.gnu.org/licenses/.  */
 
 #include "mini-mpq.h"
 
+#ifndef MINI_GMP_ENABLE_FLOAT
+#define MINI_GMP_ENABLE_FLOAT 1
+#endif
+
 #ifndef GMP_LIMB_HIGHBIT
 /* Define macros and static functions already defined by mini-gmp.c */
 #define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT)
@@ -420,6 +424,7 @@ mpq_inv (mpq_t r, const mpq_t q)
 }
 
 \f
+#if MINI_GMP_ENABLE_FLOAT
 /* MPQ to/from double. */
 void
 mpq_set_d (mpq_t r, double x)
@@ -472,7 +477,7 @@ mpq_get_d (const mpq_t u)
 
   return ret;
 }
-
+#endif /* MINI_GMP_ENABLE_FLOAT */
 \f
 /* MPQ and strings/streams. */
 char *