Ticket #46152: isnan-patch.diff

File isnan-patch.diff, 1.3 KB (added by RJVB (René Bertin), 9 years ago)
  • kdchart/kdablibfakes/src/KDABLibFakes.h

    diff --git kdchart/kdablibfakes/src/KDABLibFakes.h kdchart/kdablibfakes/src/KDABLibFakes.h
    index ab10c46..5f17791 100644
     
    2929 ** your option) use any later version of the GNU General Public
    3030 ** License if such license has been publicly approved by
    3131 ** Klarälvdalens Datakonsult AB (or its successors, if any).
    32  ** 
     32 **
    3333 ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
    3434 ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
    3535 ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
    3636 ** not expressly granted herein.
    37  ** 
     37 **
    3838 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
    3939 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    4040 **
     
    4646#if defined Q_OS_DARWIN
    4747/* On Mac OS X, ensure that <cmath> will define std::isnan */
    4848#define _GLIBCPP_USE_C99 1
     49#include <math.h>
    4950#endif
    5051
    5152#include <cmath>
     
    7374#define ISNAN(x ) _isnan(x )
    7475#define ISINF(x ) (!(_finite(x ) + _isnan(x ) ) )
    7576#elif defined (Q_OS_DARWIN) || defined (Q_OS_CYGWIN)
    76 #define ISNAN(x) std::isnan(x)
    77 #define ISINF(x) std::isinf(x)
     77#define ISNAN(x) isnan(double(x))
     78#define ISINF(x) isinf(double(x))
    7879#else
    7980#define ISNAN(x) isnan(x)
    8081#define ISINF(x) isinf(x)