1
0
forked from 0ad/0ad

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:
dave 2006-09-03 02:17:57 +00:00
parent 8e02ec84f9
commit 3b41b5fbd1

View File

@ -25,6 +25,7 @@
#include "lib/config.h"
#include "lib/debug.h" // ErrorReaction
#include <cmath>
// some functions among the sysdep API are implemented as macros
// 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.
// Since sysdep.h will normally be included before cmath is, make sure we load
// cmath first to let it define/undef that macro.
# include <cmath>
# ifndef isfinite
# define isfinite std::isfinite
# define isnan std::isnan