Bug #74288 [Opn->Dup]: php check for isinf is wrong
| From: | nikic@php.net | Date: | Thu, 23 Mar 2017 11:25:22 +0000 |
| Subject: | Bug #74288 [Opn->Dup]: php check for isinf is wrong | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208024@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74288&edit=1
ID: 74288
Updated by: nikic@php.net
Reported by: apyhalov at gmail dot com
Summary: php check for isinf is wrong
-Status: Open
+Status: Duplicate
Type: Bug
Package: Compile Failure
Operating System: illumos
PHP Version: 7.0.17
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2017-03-23 11:25:14] nikic@php.net
Duplicate of bug #74265.
------------------------------------------------------------------------
[2017-03-22 05:38:04] apyhalov at gmail dot com
Description:
------------
In latest php versions it checks for isinf with
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]]),
which leads to defining
#define HAVE_DECL_ISINF 0
when isinf is not declared.
Later it checks for it with
#ifdef HAVE_DECL_ISINF
#define zend_isinf(a) isinf(a)
#elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */
#define zend_isinf(a) (((a)==INFINITY || (a)==-INFINITY)?1:0)
#elif defined(HAVE_FPCLASS)
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
#else
#define zend_isinf(a) 0
#endif
This should be changed to something like
#if defined(HAVE_DECL_ISINF) && (HAVE_DECL_ISINF!=0)
...
This is also true for HAVE_DECL_ISNAN and HAVE_DECL_ISFINITE
Otherwise linking php fails with 'Undefined symbol isinf...'.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74288&edit=1