util/ansi-print.cc: Use fallback implementation for lround on MSVC
Unfortuately Visual Studio (still) does not support the C99 function
lround, so provide a fallback implementation for it.
diff --git a/util/ansi-print.cc b/util/ansi-print.cc
index 873bee8..e166c91 100644
--- a/util/ansi-print.cc
+++ b/util/ansi-print.cc
@@ -41,6 +41,17 @@
#include <unistd.h> /* for isatty() */
#endif
+#ifdef _MSC_VER
+static inline long int
+lround (double x)
+{
+ if (x >= 0)
+ return floor (x + 0.5);
+ else
+ return ceil (x - 0.5);
+}
+#endif
+
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define CELL_W 8