isnan.h revision d8fa3c4faade9a5a8e7f79450544b1925e1ade41
#ifndef __ISNAN_H__
#define __ISNAN_H__
/*
* Temporary fix for various misdefinitions of isnan().
* isnan() is becoming undef'd in some .h files.
* #include this last in your .cpp file to get it right.
*
* The problem is that isnan and isfinite are part of C99 but aren't part of
* the C++ standard (which predates C99).
*
* Authors:
* Inkscape groupies and obsessive-compulsives
*
* Copyright (C) 2004 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*
* 2005 modification hereby placed in public domain. Probably supercedes the 2004 copyright
* for the code itself.
*/
#include <cmath>
/* You might try changing the above to <cmath> if you have problems.
* Whether you use math.h or cmath, you may need to edit the .cpp file
*/
#if defined(__isnan)
#else
#endif
/* If the above doesn't work, then try (a != a).
* Also, please report a bug as per http://www.inkscape.org/report_bugs.php,
* giving information about what platform and compiler version you're using.
*/
#if defined(__isfinite)
#else
#endif
/* If the above doesn't work, then try (finite(_a) && !isNaN(_a)) or (!isNaN((_a) - (_a))).
* Also, please report a bug as per http://www.inkscape.org/report_bugs.php,
* giving information about what platform and compiler version you're using.
*/
#endif /* __ISNAN_H__ */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :