Martin Spott: Revised handling of missing isnan() on earlier versions of

FreeBSD.
This commit is contained in:
curt 2004-12-02 15:00:26 +00:00
parent fb0dded103
commit 8048e6297c
2 changed files with 14 additions and 2 deletions

View File

@ -46,11 +46,14 @@ inline int (isnan)(double r) { return isnan(r); }
#endif
#if defined (__FreeBSD__)
inline int isnan(double r) { return !(r <= 0 || r >= 0); }
# if __FreeBSD_version < 500000
extern "C" {
inline int isnan(double r) { return !(r <= 0 || r >= 0); }
}
# endif
#endif
static ssgStateSelector *layer_states[SGCloudLayer::SG_MAX_CLOUD_COVERAGES];
static bool state_initialized = false;
static bool bump_mapping = false;

View File

@ -46,6 +46,15 @@ inline int (isnan)(double r) { return isnan(r); }
#define isnan(x) _isnan(x)
#endif
#if defined (__FreeBSD__)
# if __FreeBSD_version < 500000
extern "C" {
inline int isnan(double r) { return !(r <= 0 || r >= 0); }
}
# endif
#endif
#if defined (__FreeBSD__)
inline int isnan(double r) { return !(r <= 0 || r >= 0); }
#endif