1
0
forked from 0ad/0ad

Linux build fixes

This was SVN commit r7247.
This commit is contained in:
Ykkrosh 2010-01-05 20:55:07 +00:00
parent c8fed35c52
commit d1f6ea785a
4 changed files with 11 additions and 10 deletions

View File

@ -150,6 +150,7 @@ extern size_t fpclassifyd(double d);
// #ifndef and define it if it's not there already.
// We've included <cmath> above to make sure it defines that macro.
# ifndef isfinite
# define fpclassify std::fpclassify
# define isfinite std::isfinite
# define isnan std::isnan
# define isinf std::isinf

View File

@ -34,14 +34,14 @@ public:
T sub = std::numeric_limits<T>::denorm_min();
T sub2 = std::numeric_limits<T>::min() / 2;
TS_ASSERT_EQUALS(fpclassify(zero), FP_ZERO);
TS_ASSERT_EQUALS(fpclassify(one), FP_NORMAL);
TS_ASSERT_EQUALS(fpclassify(inf), FP_INFINITE);
TS_ASSERT_EQUALS(fpclassify(qnan), FP_NAN);
TS_ASSERT_EQUALS(fpclassify(snan), FP_NAN);
TS_ASSERT_EQUALS(fpclassify(min), FP_NORMAL);
TS_ASSERT_EQUALS(fpclassify(sub), FP_SUBNORMAL);
TS_ASSERT_EQUALS(fpclassify(sub2), FP_SUBNORMAL);
TS_ASSERT_EQUALS((int)fpclassify(zero), (int)FP_ZERO);
TS_ASSERT_EQUALS((int)fpclassify(one), (int)FP_NORMAL);
TS_ASSERT_EQUALS((int)fpclassify(inf), (int)FP_INFINITE);
TS_ASSERT_EQUALS((int)fpclassify(qnan), (int)FP_NAN);
TS_ASSERT_EQUALS((int)fpclassify(snan), (int)FP_NAN);
TS_ASSERT_EQUALS((int)fpclassify(min), (int)FP_NORMAL);
TS_ASSERT_EQUALS((int)fpclassify(sub), (int)FP_SUBNORMAL);
TS_ASSERT_EQUALS((int)fpclassify(sub2), (int)FP_SUBNORMAL);
TS_ASSERT(!isnan(zero));
TS_ASSERT(!isnan(one));

View File

@ -65,7 +65,9 @@ extern int wclosedir(WDIR*);
#define O_NO_AIO_NP 0x20000
// POSIX flags not supported by the underlying Win32 _wsopen_s:
#if OS_WIN
#define O_NONBLOCK 0x1000000
#endif
extern int wopen(const wchar_t* pathname, int oflag, ...);
extern int wclose(int fd);

View File

@ -25,8 +25,6 @@
#include "lib/wchar.h"
#include "lib/path_util.h"
struct DIR;
struct WDIR
{
DIR* d;