https://git.reactos.org/?p=reactos.git;a=commitdiff;h=06f1ac5fa4f1e84afb4d5b...
commit 06f1ac5fa4f1e84afb4d5b4392e84f9781bb2d6c Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Wed Aug 24 10:42:19 2022 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Thu Dec 1 15:21:59 2022 +0200
[CRT] Add a workaround for CORE-18255 --- sdk/include/crt/math.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sdk/include/crt/math.h b/sdk/include/crt/math.h index 80aafd21d9c..f32c2a33a77 100644 --- a/sdk/include/crt/math.h +++ b/sdk/include/crt/math.h @@ -295,6 +295,9 @@ _Check_return_ __CRT_INLINE long lrintl(_In_ long double x) { return (long)((x < _Check_return_ __CRT_INLINE long long llrint(_In_ double x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); } _Check_return_ __CRT_INLINE long long llrintf(_In_ float x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); } _Check_return_ __CRT_INLINE long long llrintl(_In_ long double x) { return (long long)((x < 0) ? (x - 0.5f) : (x + 0.5)); } +#ifdef _MSC_VER +#define log2 _log2 // nasty hack, see CORE-18255 +#endif _Check_return_ __CRT_INLINE double log2(_In_ double x) { return log(x) / log(2); } #endif /* !_CRTBLD */