|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-01-10 09:54 UTC] rpb at community dot net dot uk
[2002-04-01 04:21 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 00:00:02 2025 UTC |
If PHP is built without complete ANSI C prototypes in scope the 'round' function can fail. This is because the second argument to 'pow' in ext/standard/math.c:143 is an integer, and without prototypes it doesn't receive its implicit cast to a double, causing the 'pow' function to receive an undefined value on the stack. The simple fix is to put an explicit (double) cast in: f = pow(10.0, (double)places); A better fix might be to ensure that the ANSI version of the prototypes from <math.h> are always in scope, but that may be difficult to achieve across a wide variety of systems.