svn: /php/php-src/ branches/PHP_5_3/ext/gmp/gmp.c trunk/ext/gmp/gmp.c
| From: | Pierre Joye | Date: | Tue, 23 Feb 2010 11:07:39 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/gmp/gmp.c trunk/ext/gmp/gmp.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-61907@lists.php.net to get a copy of this message | ||
pajoye Tue, 23 Feb 2010 11:07:39 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=295402
Log:
- fix build when __GMP_BITS_PER_MP_LIMB is not defined but GMP_LIMB_BITS (no trace of this change in
gmp's changelog...)
Changed paths:
U php/php-src/branches/PHP_5_3/ext/gmp/gmp.c
U php/php-src/trunk/ext/gmp/gmp.c
Modified: php/php-src/branches/PHP_5_3/ext/gmp/gmp.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/gmp/gmp.c 2010-02-23 10:27:15 UTC (rev 295401)
+++ php/php-src/branches/PHP_5_3/ext/gmp/gmp.c 2010-02-23 11:07:39 UTC (rev 295402)
@@ -1374,8 +1374,11 @@
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);
}
/* }}} */
Modified: php/php-src/trunk/ext/gmp/gmp.c
===================================================================
--- php/php-src/trunk/ext/gmp/gmp.c 2010-02-23 10:27:15 UTC (rev 295401)
+++ php/php-src/trunk/ext/gmp/gmp.c 2010-02-23 11:07:39 UTC (rev 295402)
@@ -1380,8 +1380,11 @@
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);
}
/* }}} */