Moved the include of cmath out of the #ifdef
This avoids stuff like /usr/include/c++/4.0.0/cmath:85: error: template with C linkage /usr/include/c++/4.0.0/cmath: In function 'float std::abs(float)': /usr/include/c++/4.0.0/cmath:92: error: declaration of C function 'float std::abs(float)' conflicts with /usr/include/c++/4.0.0/cmath:88: error: previous declaration 'double std::abs(double)' here This was SVN commit r4291.
This commit is contained in:
parent
8e02ec84f9
commit
3b41b5fbd1
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include "lib/config.h"
|
#include "lib/config.h"
|
||||||
#include "lib/debug.h" // ErrorReaction
|
#include "lib/debug.h" // ErrorReaction
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
// some functions among the sysdep API are implemented as macros
|
// some functions among the sysdep API are implemented as macros
|
||||||
// that redirect to the platform-dependent version. this is done where
|
// that redirect to the platform-dependent version. this is done where
|
||||||
@ -149,7 +150,6 @@ extern void* alloca(size_t size);
|
|||||||
// #ifndef and define it if it's not there.
|
// #ifndef and define it if it's not there.
|
||||||
// Since sysdep.h will normally be included before cmath is, make sure we load
|
// Since sysdep.h will normally be included before cmath is, make sure we load
|
||||||
// cmath first to let it define/undef that macro.
|
// cmath first to let it define/undef that macro.
|
||||||
# include <cmath>
|
|
||||||
# ifndef isfinite
|
# ifndef isfinite
|
||||||
# define isfinite std::isfinite
|
# define isfinite std::isfinite
|
||||||
# define isnan std::isnan
|
# define isnan std::isnan
|
||||||
|
Loading…
Reference in New Issue
Block a user