Bug #74288 [NEW]: php check for isinf is wrong
| From: | apyhalov at gmail dot com | Date: | Wed, 22 Mar 2017 05:38:09 +0000 |
| Subject: | Bug #74288 [NEW]: php check for isinf is wrong | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-207994@lists.php.net to get a copy of this message | ||
From: apyhalov at gmail dot com
Operating system: illumos
PHP version: 7.0.17
Package: Compile Failure
Bug Type: Bug
Bug description:php check for isinf is wrong
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 bug report at https://bugs.php.net/bug.php?id=74288&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74288&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74288&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74288&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74288&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74288&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74288&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74288&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74288&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74288&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74288&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74288&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74288&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74288&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74288&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74288&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74288&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74288&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74288&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74288&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74288&r=mysqlcfg