Skip to content
Snippets Groups Projects
Commit f27a4ba6 authored by David Gobbi's avatar David Gobbi
Browse files

BUG 13443: Fix crash when vtkMath.h is wrapped on FreeBSD.

The isinf() and isnan() macros on FreeBSD are defined in terms of
the isinf() and isnan() library functions.  A macro expansion bug
in the VTK 5.10 wrappers caused these macros to expand recursively,
resulting in a segfault in the wrapper tools.  The macro expansion
bug is fixed in VTK 6, but VTK 5.10 requires the vtkMath IsNan()
and IsInf() inline definitions to be blocked.

Change-Id: Ifc4ce554fd7273367f3fa6c6dad3b26dfa7871d4
parent 0a0b43ed
Branches
No related tags found
No related merge requests found
......@@ -1337,19 +1337,23 @@ inline double vtkMath::ClampAndNormalizeValue(double value,
}
#if defined(VTK_HAS_ISINF)
#ifndef __WRAP__ // Fixes bug 13443 for VTK 5.10
//-----------------------------------------------------------------------------
inline int vtkMath::IsInf(double x)
{
return (isinf(x) ? 1 : 0);
}
#endif
#endif
#if defined(VTK_HAS_ISNAN)
#ifndef __WRAP__ // Fixes bug 13443 for VTK 5.10
//-----------------------------------------------------------------------------
inline int vtkMath::IsNan(double x)
{
return (isnan(x) ? 1 : 0);
}
#endif
#endif
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment