mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
This commit is contained in:
commit
ede9cd4f99
4
changes/msvc_lround
Normal file
4
changes/msvc_lround
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Build fixes:
|
||||||
|
- Provide a substitute implementation of lround() for MSVC, which
|
||||||
|
apparently lacks it. Patch from Gisle Vanem.
|
||||||
|
|
@ -335,7 +335,11 @@ tor_mathlog(double d)
|
|||||||
long
|
long
|
||||||
tor_lround(double d)
|
tor_lround(double d)
|
||||||
{
|
{
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
return (long)(d > 0 ? d + 0.5 : ceil(d - 0.5));
|
||||||
|
#else
|
||||||
return lround(d);
|
return lround(d);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns floor(log2(u64)). If u64 is 0, (incorrectly) returns 0. */
|
/** Returns floor(log2(u64)). If u64 is 0, (incorrectly) returns 0. */
|
||||||
|
Loading…
Reference in New Issue
Block a user