From 9a03e86252f61459b5fd7a44731dea27f5fef6ea Mon Sep 17 00:00:00 2001 From: Andrew Fitzgibbon Date: Fri, 27 May 2016 22:41:22 +0100 Subject: [PATCH] Newer MSVC has rint and INFINITY Fixes https://github.com/jlblancoc/suitesparse-metis-for-windows/issues/19 --- GKlib/gk_arch.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GKlib/gk_arch.h b/GKlib/gk_arch.h index 2cb80cc..8371cce 100644 --- a/GKlib/gk_arch.h +++ b/GKlib/gk_arch.h @@ -59,13 +59,17 @@ typedef ptrdiff_t ssize_t; #endif #ifdef __MSC__ -/* MSC does not have rint() function */ +/* MSC may not have rint() function */ +#if(_MSC_VER < 1900) #define rint(x) ((int)((x)+0.5)) +#endif /* MSC does not have INFINITY defined */ #ifndef INFINITY +#if(_MSC_VER < 1900) #define INFINITY FLT_MAX #endif #endif +#endif #endif -- 1.9.1