Haiku OS support; thanks to MrSunshine

This commit is contained in:
Moritz Warning
2010-10-04 00:58:14 +02:00
parent 2490631d5b
commit 233299e5c8
8 changed files with 39 additions and 6 deletions
+9 -3
View File
@@ -315,7 +315,7 @@ char *Port::strupr(char *s)
#endif
#if linux || __APPLE__ || __FreeBSD__ || __MINGW32__
#if linux || __APPLE__ || __FreeBSD__ || __MINGW32__ || __HAIKU__
#include <math.h>
#if linux
@@ -368,7 +368,7 @@ PortInitializer::PortInitializer()
#endif
}
#ifndef __MINGW32__
#if !defined __MINGW32__ && !defined __HAIKU__
#undef isnan
#endif
int Port::isNan(double r)
@@ -377,6 +377,8 @@ int Port::isNan(double r)
return __inline_isnan(r);
#elif defined __MINGW32__
return isnan(r);
#elif defined __HAIKU__
return isnan(r);
#else
return ::isnan(r);
#endif
@@ -388,6 +390,8 @@ int Port::isNan(long double r)
return __inline_isnan(r);
#elif defined __MINGW32__
return isnan(r);
#elif defined __HAIKU__
return isnan(r);
#else
return ::isnan(r);
#endif
@@ -415,7 +419,7 @@ int Port::isFinite(double r)
return ::finite(r);
}
#ifndef __MINGW32__
#if !defined __MINGW32__ && !defined __HAIKU__
#undef isinf
#endif
int Port::isInfinity(double r)
@@ -424,6 +428,8 @@ int Port::isInfinity(double r)
return fpclassify(r) == FP_INFINITE;
#elif defined __MINGW32__
return isinf(r);
#elif defined __HAIKU__
return isinf(r);
#else
return ::isinf(r);
#endif
+1 -1
View File
@@ -40,7 +40,7 @@ struct Port
static double dbl_min;
static long double ldbl_max;
#if __GNUC__
#if __GNUC__ && !defined __HAIKU__
// These conflict with macros in math.h, should rename them
#undef isnan
#undef isfinite
+4
View File
@@ -34,6 +34,10 @@
#include <errno.h>
#endif
#ifdef __HAIKU__
#include <iostream>
#endif
#if POSIX
#include <sys/types.h>
#include <sys/stat.h>