kdelibs 3.80.3 on OpenBSD - isfinite()

Alex Merry alexander.merry at ccc.ox.ac.uk
Tue Mar 27 12:44:08 CEST 2007


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 :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: date_object_openbsd.diff
Type: text/x-diff
Size: 1558 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-quality/attachments/20070327/bce170d2/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-quality/attachments/20070327/bce170d2/attachment.pgp 


More information about the kde-quality mailing list