mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 19:10:14 +01:00
util: don't define isfinite(), isnan() for MSVC >= 1800
Signed-off-by: Brian Paul <brianp@vmware.com> Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
aff7c5e78a
commit
bf25660325
1 changed files with 4 additions and 0 deletions
|
|
@ -112,10 +112,13 @@ static INLINE float logf( float f )
|
|||
#define logf(x) ((float)log((double)(x)))
|
||||
#endif /* logf */
|
||||
|
||||
#if _MSC_VER < 1800
|
||||
#define isfinite(x) _finite((double)(x))
|
||||
#define isnan(x) _isnan((double)(x))
|
||||
#endif /* _MSC_VER < 1800 */
|
||||
#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
|
||||
|
||||
#if _MSC_VER < 1800
|
||||
static INLINE double log2( double x )
|
||||
{
|
||||
const double invln2 = 1.442695041;
|
||||
|
|
@ -133,6 +136,7 @@ roundf(float x)
|
|||
{
|
||||
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define INFINITY (DBL_MAX + DBL_MAX)
|
||||
#define NAN (INFINITY - INFINITY)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue