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.
This commit is contained in:
parent
a4446b10bf
commit
b4c5c52944
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue