|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74288 php check for isinf is wrong
Submitted: 2017-03-22 05:38 UTC Modified: 2017-03-23 11:25 UTC
From: apyhalov at gmail dot com Assigned:
Status: Duplicate Package: Compile Failure
PHP Version: 7.0.17 OS: illumos
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: apyhalov at gmail dot com
New email:
PHP Version: OS:


 [2017-03-22 05:38 UTC] apyhalov at gmail dot com
In latest php versions it checks for isinf with

AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]]), 

which leads to defining 


when isinf is not declared.

Later it checks for it with 

#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))
#define zend_isinf(a) 0

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...'.


isinf.patch (last revision 2017-03-22 05:39 UTC by apyhalov at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-23 11:25 UTC]
Duplicate of bug #74265.
 [2017-03-23 11:25 UTC]
-Status: Open +Status: Duplicate
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 08:01:32 2024 UTC