diff options
author | Pierre Joye <pajoye@php.net> | 2010-02-23 11:07:39 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2010-02-23 11:07:39 +0000 |
commit | 5cbece0a8eaed4738c4be476d9ddcc6a30cb8ec0 (patch) | |
tree | 0d8232b14823f929dbdd94d560aee57d7720b077 /ext/gmp | |
parent | fbbe3e3686b4abe71982106d5ca2dde895ec8fdf (diff) | |
download | php-git-5cbece0a8eaed4738c4be476d9ddcc6a30cb8ec0.tar.gz |
- fix build when __GMP_BITS_PER_MP_LIMB is not defined but GMP_LIMB_BITS (no trace of this change in gmp's changelog...)
Diffstat (limited to 'ext/gmp')
-rw-r--r-- | ext/gmp/gmp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index a54ffe98f8..f53dcd6526 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1374,8 +1374,11 @@ ZEND_FUNCTION(gmp_random) GMPG(rand_initialized) = 1; } +#ifdef GMP_LIMB_BITS + mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * GMP_LIMB_BITS); +#else mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * __GMP_BITS_PER_MP_LIMB); - +#endif ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp); } /* }}} */ |