cvs: php4 /ext/standard math.c

From: Date: Thu, 24 Oct 2002 18:31:11 +0000
Subject: cvs: php4 /ext/standard math.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-15381@lists.php.net to get a copy of this message
sniper Thu Oct 24 14:31:11 2002 EDT Modified files: /php4/ext/standard math.c Log: - If functions are not available on OS, they're not available in PHP. Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.91 php4/ext/standard/math.c:1.92 --- php4/ext/standard/math.c:1.91 Thu Oct 24 08:21:07 2002 +++ php4/ext/standard/math.c Thu Oct 24 14:31:11 2002 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c,v 1.91 2002/10/24 12:21:07 sas Exp $ */ +/* $Id: math.c,v 1.92 2002/10/24 18:31:11 sniper Exp $ */ #include "php.h" #include "php_math.h" @@ -316,12 +316,11 @@ /* }}} */ #if !defined(PHP_WIN32) && !defined(NETWARE) +#ifdef HAVE_ASINH /* {{{ proto float asinh(float number) Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number */ - PHP_FUNCTION(asinh) { -#ifdef HAVE_ASINH zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { @@ -330,16 +329,15 @@ convert_to_double_ex(num); Z_DVAL_P(return_value) = asinh(Z_DVAL_PP(num)); Z_TYPE_P(return_value) = IS_DOUBLE; -#endif } - /* }}} */ +#endif /* HAVE_ASINH */ + +#ifdef HAVE_ACOSH /* {{{ proto float acosh(float number) Returns the inverse hyperbolic cosine of the number, i.e. the value whose hyperbolic cosine is number */ - PHP_FUNCTION(acosh) { -#ifdef HAVE_ACOSH zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { @@ -348,16 +346,15 @@ convert_to_double_ex(num); Z_DVAL_P(return_value) = acosh(Z_DVAL_PP(num)); Z_TYPE_P(return_value) = IS_DOUBLE; -#endif } - /* }}} */ +#endif /* HAVE_ACOSH */ + +#ifdef HAVE_ATANH /* {{{ proto float atanh(float number) Returns the inverse hyperbolic tangent of the number, i.e. the value whose hyperbolic tangent is number */ - PHP_FUNCTION(atanh) { -#ifdef HAVE_ATANH zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { @@ -366,21 +363,19 @@ convert_to_double_ex(num); Z_DVAL_P(return_value) = atanh(Z_DVAL_PP(num)); Z_TYPE_P(return_value) = IS_DOUBLE; -#endif } - /* }}} */ -#endif +#endif /* HAVE_ATANH */ +#endif /* !defined(PHP_WIN32) && !defined(NETWARE) */ + /* {{{ proto float pi(void) Returns an approximation of pi */ - PHP_FUNCTION(pi) { Z_DVAL_P(return_value) = M_PI; Z_TYPE_P(return_value) = IS_DOUBLE; } - /* }}} */

« previous php.cvs (#15381) next »