[vtk-developers] Did I break master? (isnan)

David Gobbi david.gobbi at gmail.com
Tue Mar 12 09:31:06 EDT 2013


On Mon, Mar 11, 2013 at 4:02 PM, Sean McBride <sean at rogue-research.com> wrote:
> On Mon, 11 Mar 2013 15:52:33 -0600, David Gobbi said:
>
>>However... Common/Core/vtkMathConfigure.h.in has this:
>>
>>#include <cmath>
>>#include <float.h>
>>
>>So on some platforms we get std::isnan() from cmath, on others we get
>>::isnan() from float.h.  Ugly situation.  A safe but ugly solution is
>>the following:
>>
>>Common/Core/vtkMathConfigure.h.in:
>>#include <cmath>
>>#include <math.h>
>>#include <float.h>
>>
>>That covers all the bases.
>
> Thanks David... I had figured out it was a header include problem, but ya beat me to the details.
>
> I look forward to the day we can assume C++11 and use use std::isnan and friends. :)
>
> I'll test/submit a patch...

It looks like you'll have to revert the following part of your patch.
And afflicted machines might have to erase their cache.

# According to C99, they should be declared in math.h.
if(NOT HAVE_MATH_H)
  check_include_file("math.h" HAVE_MATH_H)
endif()
if(HAVE_MATH_H)
  check_symbol_exists(isnan "math.h" VTK_HAS_ISNAN)
  check_symbol_exists(isinf "math.h" VTK_HAS_ISINF)
  check_symbol_exists(isfinite "math.h" VTK_HAS_ISFINITE)
endif()

 - David



More information about the vtk-developers mailing list