mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +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:
parent
4a23562339
commit
bbec460245
2 changed files with 5 additions and 7 deletions
|
@ -381,13 +381,6 @@ scm_i_init_guile (void *base)
|
||||||
if (scm_initialized_p)
|
if (scm_initialized_p)
|
||||||
return;
|
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_storage_prehistory ();
|
||||||
scm_threads_prehistory (base); /* requires storage_prehistory */
|
scm_threads_prehistory (base); /* requires storage_prehistory */
|
||||||
scm_weaks_prehistory (); /* requires storage_prehistory */
|
scm_weaks_prehistory (); /* requires storage_prehistory */
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <verify.h>
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unicase.h>
|
#include <unicase.h>
|
||||||
|
@ -68,6 +70,9 @@
|
||||||
|
|
||||||
#include "libguile/eq.h"
|
#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 */
|
/* values per glibc, if not already defined */
|
||||||
#ifndef M_LOG10E
|
#ifndef M_LOG10E
|
||||||
#define M_LOG10E 0.43429448190325182765
|
#define M_LOG10E 0.43429448190325182765
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue