
23 Aug
2011
23 Aug
'11
10:27 p.m.
lround() is missing in MS Visual-C's <math.h>. Not available anywhere. Here is an easy patch: --- Git-latest\src\common\util.c Sun Aug 14 13:48:49 2011 +++ src\common\util.c Tue Aug 23 21:15:25 2011 @@ -335,7 +335,11 @@ long tor_lround(double d) { +#ifdef _MSC_VER + return (long)(d > 0 ? d + 0.5 : ceil(d - 0.5)); +#else return lround(d); +#endif } /** Returns floor(log2(u64)). If u64 is 0, (incorrectly) returns 0. */ ---------------- --gv
5007
Age (days ago)
5008
Last active (days ago)
1 comments
2 participants
participants (2)
-
Gisle Vanem
-
Nick Mathewson