blob: 2ffb9057a8e76774ca5e8ad25a4125c4a60e4b71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
$NetBSD: patch-af,v 1.2 2010/03/03 02:15:15 taca Exp $
Fix php-gmp build problem with gmp-5.0.1 and later refering
http://svn.php.net/viewvc?view=revision&revision=295402.
--- ext/gmp/gmp.c.orig 2010-01-03 09:23:27.000000000 +0000
+++ ext/gmp/gmp.c
@@ -1396,8 +1396,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);
}
/* }}} */
|