提交 b4c5c529 编写于 作者: C Chun-wei Fan 提交者: Behdad Esfahbod

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.
上级 a4446b10
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册