1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

Make the `sizeof (mpz_t)' check at compile-time.

* libguile/init.c (scm_i_init_guile): Remove the `sizeof (mpz_t)'
  run-time check.

* libguile/numbers.c: Add a compile-time check for `sizeof (mpz_t)'.
This commit is contained in:
Ludovic Courtès 2011-04-25 22:36:30 +02:00
parent 4a23562339
commit bbec460245
2 changed files with 5 additions and 7 deletions

View file

@ -381,13 +381,6 @@ scm_i_init_guile (void *base)
if (scm_initialized_p)
return;
if (sizeof (mpz_t) > (3 * sizeof (scm_t_bits)))
{
fprintf (stderr,
"GMP's mpz_t must fit into a double_cell,"
"but doesn't seem to here.\n");
}
scm_storage_prehistory ();
scm_threads_prehistory (base); /* requires storage_prehistory */
scm_weaks_prehistory (); /* requires storage_prehistory */

View file

@ -45,6 +45,8 @@
# include <config.h>
#endif
#include <verify.h>
#include <math.h>
#include <string.h>
#include <unicase.h>
@ -68,6 +70,9 @@
#include "libguile/eq.h"
/* GMP's `mpz_t' must fit into a double cell. */
verify (sizeof (mpz_t) <= (2 * sizeof (scm_t_bits)));
/* values per glibc, if not already defined */
#ifndef M_LOG10E
#define M_LOG10E 0.43429448190325182765