From: teor Date: Thu, 23 Aug 2018 08:55:39 +0000 (+1000) Subject: Silence a compilation warning on MSVC 2017 and clang-cl X-Git-Tag: tor-0.2.9.17~10^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc4ea34a262993bf69836d1bffa3175e24261565;p=thirdparty%2Ftor.git Silence a compilation warning on MSVC 2017 and clang-cl test.c no longer uses lround(), so we don't need to declare it, and we can use math.h for fabs(). Fixes bug 27185; bugfix on 0.2.2.2-alpha. --- diff --git a/changes/bug27185 b/changes/bug27185 new file mode 100644 index 0000000000..79221b3df4 --- /dev/null +++ b/changes/bug27185 @@ -0,0 +1,3 @@ + o Minor bugfixes (Windows, compilation): + - Silence a compilation warning on MSVC 2017 and clang-cl. + Fixes bug 27185; bugfix on 0.2.2.2-alpha. diff --git a/src/test/test.c b/src/test/test.c index 0fef697909..6330eb9b93 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -22,6 +22,8 @@ #include #endif +#include + /* These macros pull in declarations for some functions and structures that * are typically file-private. */ #define GEOIP_PRIVATE @@ -31,14 +33,6 @@ #define MAIN_PRIVATE #define STATEFILE_PRIVATE -/* - * Linux doesn't provide lround in math.h by default, but mac os does... - * It's best just to leave math.h out of the picture entirely. - */ -//#include -long int lround(double x); -double fabs(double x); - #include "or.h" #include "backtrace.h" #include "buffers.h"