cvs: php-src /ext/standard basic_functions.c math.c php_math.h
| From: | Ilia Alshanetsky | Date: | Mon, 24 May 2004 17:02:12 +0000 |
| Subject: | cvs: php-src /ext/standard basic_functions.c math.c php_math.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-27429@lists.php.net to get a copy of this message | ||
iliaa Mon May 24 13:02:12 2004 EDT
Modified files:
/php-src/ext/standard math.c php_math.h basic_functions.c
Log:
Fixed bug #28508 (Do not make hypot() available if not supported by libc).
http://cvs.php.net/diff.php/php-src/ext/standard/math.c?r1=1.113&r2=1.114&ty=u
Index: php-src/ext/standard/math.c
diff -u php-src/ext/standard/math.c:1.113 php-src/ext/standard/math.c:1.114
--- php-src/ext/standard/math.c:1.113 Fri Apr 30 09:26:01 2004
+++ php-src/ext/standard/math.c Mon May 24 13:02:11 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: math.c,v 1.113 2004/04/30 13:26:01 iliaa Exp $ */
+/* $Id: math.c,v 1.114 2004/05/24 17:02:11 iliaa Exp $ */
#include "php.h"
#include "php_math.h"
@@ -622,9 +622,9 @@
disappear in the next version of PHP!
*/
+#ifdef HAVE_HYPOT
PHP_FUNCTION(hypot)
{
-#ifdef HAVE_HYPOT
zval **num1, **num2;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &num1, &num2) == FAILURE) {
@@ -634,8 +634,8 @@
convert_to_double_ex(num2);
Z_DVAL_P(return_value) = hypot(Z_DVAL_PP(num1), Z_DVAL_PP(num2));
Z_TYPE_P(return_value) = IS_DOUBLE;
-#endif
}
+#endif
/* }}} */
http://cvs.php.net/diff.php/php-src/ext/standard/php_math.h?r1=1.21&r2=1.22&ty=u
Index: php-src/ext/standard/php_math.h
diff -u php-src/ext/standard/php_math.h:1.21 php-src/ext/standard/php_math.h:1.22
--- php-src/ext/standard/php_math.h:1.21 Thu Jan 8 12:32:51 2004
+++ php-src/ext/standard/php_math.h Mon May 24 13:02:12 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_math.h,v 1.21 2004/01/08 17:32:51 sniper Exp $ */
+/* $Id: php_math.h,v 1.22 2004/05/24 17:02:12 iliaa Exp $ */
#ifndef PHP_MATH_H
#define PHP_MATH_H
@@ -66,7 +66,9 @@
WARNING: these functions are expermental: they could change their names or
disappear in the next version of PHP!
*/
+#ifdef HAVE_HYPOT
PHP_FUNCTION(hypot);
+#endif
PHP_FUNCTION(expm1);
PHP_FUNCTION(log1p);
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.666&r2=1.667&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.666 php-src/ext/standard/basic_functions.c:1.667
--- php-src/ext/standard/basic_functions.c:1.666 Wed May 12 06:17:11 2004
+++ php-src/ext/standard/basic_functions.c Mon May 24 13:02:12 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.666 2004/05/12 10:17:11 helly Exp $ */
+/* $Id: basic_functions.c,v 1.667 2004/05/24 17:02:12 iliaa Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -401,7 +401,9 @@
PHP_FE(log, NULL)
PHP_FE(log10, NULL)
PHP_FE(sqrt, NULL)
+#ifdef HAVE_HYPOT
PHP_FE(hypot, NULL)
+#endif
PHP_FE(deg2rad, NULL)
PHP_FE(rad2deg, NULL)
PHP_FE(bindec, NULL)