kdelibs 3.80.3 on OpenBSD - isfinite()

Pascal S. de Kloe pascal at quies.net
Tue Mar 27 13:14:13 CEST 2007


On Tuesday 27 March 2007 12:44:08 Alex Merry wrote:
> CC kde-devel
>
> On Monday 26 Mar 2007, Pascal S. de Kloe wrote:
> > --- kdelibs-3.80.3/kjs/date_object.cpp-old	Mon Feb 19 10:56:56 2007
> > +++ kdelibs-3.80.3/kjs/date_object.cpp	Thu Mar 22 00:32:18 2007
> > @@ -65,6 +65,12 @@
> >  #endif
> >  #endif
> >
> > +#if defined(_GLIBCPP_HAVE_FINITE)
> > +#define isfinite(x) finite(x)
> > +#elif defined(_GLIBCPP_HAVE__FINITE)
> > +#define isfinite(x) _finite(x)
> > +#endif
> > +
> >  inline int gmtoffset(const tm& t)
> >  {
> >  #if PLATFORM(WIN_OS)
>
> Linux, at least, has both isfinite and finite.  We don't want to mask
> isfinite with finite.  So I guess we should wrap this somehow.
>
> I'm guessing "#ifndef isfinite" won't work.  Is there a
> _GLIBCPP_HAVE_ISFINITE define?  I'm not sure where the _GLIBCPP
> defines come from...
>
> Assuming CMake tests work as they should, we can just write a CMake
> test for isfinite.  check_function_exists didn't work for me on Linux
> (claimed it didn't exist), so I used check_prototype_exists on
> math.h. Patch attached.  Can you check that this works?
>
> Alex :-)

You are right. A CMake test sound like the right thing to do.
I no longer have this OpenBSD install but I'll test it again with the 
next public snapshot.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-quality/attachments/20070327/361ca609/attachment.pgp 


More information about the kde-quality mailing list