Bug 218288

Summary: Warning of redefining isnan & isinf macros
Product: [Applications] kst Reporter: Grégoire Verlut <gregoire.verlut>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 2.0.0   
Target Milestone: 2.0.0   
Platform: unspecified   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: mistake from me, wrong bug number

Description Grégoire Verlut 2009-12-11 15:51:44 UTC
Version:           2.0.0_devel (using unspecified)
Compiler:          GNU make port to mingw32   Version: 3.81 + patches from Eli Zaretskii (from QT Creator 1.2.1) 
OS:                Windows 32-Bit

In file included from ascii.cpp:38:
../../libkst/math_kst.h:82:1: warning: "isnan" redefined
In file included from ascii.cpp:21:
c:/Program/QT/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:380:1: warning: this is the location of the previous definition
In file included from ascii.cpp:38:
../../libkst/math_kst.h:87:1: warning: "isinf" redefined
In file included from ascii.cpp:21:
c:/Program/QT/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:346:1: warning: this is the location of the previous definition

I propose to change libkst/math_kst.h beginning from line 80:
%%%%%%%%%%%%%%%
#ifdef Q_WS_WIN32
#ifndef isnan
#define isnan _isnan
#endif
#ifndef finite
#define finite _finite
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323
#endif
#ifndef isinf
#define isinf !_finite
#endif
#endif
%%%%%%%%%%%%%%%
Comment 1 Netterfield 2009-12-11 21:13:36 UTC
SVN commit 1061472 by netterfield:

BUG: 218288
Remove some compiler warnings under windows.
The proposed patch, which I have applied here, looks harmless enough,
but I haven't personally tested it.  Let me know if there are troubles.



 M  +15 -0     math_kst.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1061472
Comment 2 Peter Kümmel 2010-08-14 12:14:29 UTC
Change version from 2.0.0_devel to 2.0.0 to simplify version numbering.
Comment 3 Peter Kümmel 2010-11-12 10:42:14 UTC
These bugs are solved with 2.0.0
Comment 4 Grégoire Verlut 2011-05-02 08:43:47 UTC
Created attachment 59524 [details]
mistake from me, wrong bug number

This is a screenshot of the curves when everything is there.
It should look the same when PRN_001 is missing (because it is indeed a copy of PRN_005)