Bug 114419 - finite undeclared in number_object.cpp
Summary: finite undeclared in number_object.cpp
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-14 22:40 UTC by Jens Hatlak
Modified: 2005-10-29 18:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Hatlak 2005-10-14 22:40:14 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.1 
OS:                Solaris

Trying to compile kdelibs 3.4.3 on Sparc/Solaris using GCC 3.4.1. Patch mentioned in bug 114340 already applied, I get the following:

number_object.cpp: In member function `virtual KJS::Value KJS::NumberProtoFuncImp::call(KJS::ExecState*, KJS::Object&, const KJS::List&)':
number_object.cpp:213: error: `finite' undeclared (first use this function)
number_object.cpp:213: error: (Each undeclared identifier is reported only once for each function it appears in.)

The relevant line reads:
    } else if (finite(fd)) {

The problem seems to be caused by this checkin:
http://mail.kde.org/pipermail/kde-commits/2005-October/039561.html

Comparing with operations.cpp, I guess a check for the availability of finite() is missing.
Comment 1 Steve Evans 2005-10-20 13:29:56 UTC
finite() is available on Solaris, but it is neccessary to include <ieeefp.h>
 to get it.

This problem still occurs in kde 3.5 beta 2
Comment 2 Bernd Kuhls 2005-10-28 16:33:35 UTC
Confirmed, adding

#include <ieeefp.h>

to number_object.cpp solves the bug for KDE-3.5b2, gcc-3.3.5, Solaris 9/Sparc
Comment 3 George Staikos 2005-10-29 18:54:00 UTC
SVN commit 475536 by staikos:

fix build on solaris
BUG: 114419


 M  +1 -1      number_object.cpp  


--- branches/KDE/3.5/kdelibs/kjs/number_object.cpp #475535:475536
@@ -211,7 +211,7 @@
     double fd = fractionDigits.toNumber(exec);
     if (isNaN(fd)) {
       f = 0;
-    } else if (finite(fd)) {
+    } else if (!isInf(fd)) {
       f = int(fd);
     }
     if (f < 0 || f > 20) {