https://git.reactos.org/?p=reactos.git;a=commitdiff;h=78417c5532f0eb95e54a59...
commit 78417c5532f0eb95e54a595457b352d30640777f Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Fri Nov 29 13:33:11 2024 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Tue Jan 14 13:34:24 2025 +0200
[CRT] Fix build with clang-cl 17
#pragma function(llabs) causes an error: "error: no_builtin attribute has no effect on defaulted or deleted functions" This is probably a bug in clang, see https://github.com/llvm/llvm-project/issues/116256 --- sdk/include/crt/math.h | 8 ++++---- sdk/include/crt/stdlib.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sdk/include/crt/math.h b/sdk/include/crt/math.h index bd5d7022523..33f460db5f6 100644 --- a/sdk/include/crt/math.h +++ b/sdk/include/crt/math.h @@ -99,7 +99,7 @@ _Check_return_ _CRT_JIT_INTRINSIC double __cdecl sqrt(_In_ double x); _Check_return_ double __cdecl tan(_In_ double x); _Check_return_ double __cdecl tanh(_In_ double x);
-#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__clang__) /* Prevent the compiler from generating calls to _CIatan2 */ #pragma function(atan2) #ifdef _M_AMD64 @@ -148,7 +148,7 @@ _Check_return_ _CRTIMP int __cdecl _set_SSE2_enable(_In_ int flag); _Check_return_ _CRTIMP float __cdecl _nextafterf(_In_ float x, _In_ float y); _Check_return_ _CRTIMP int __cdecl _isnanf(_In_ float x); _Check_return_ _CRTIMP int __cdecl _fpclassf(_In_ float x); -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__clang__) /* Prevent the compiler from generating calls to __vdecl_floor2 */ #pragma function(floor) #endif @@ -202,7 +202,7 @@ _Check_return_ float __cdecl sqrtf(_In_ float x); _Check_return_ float __cdecl tanf(_In_ float x); _Check_return_ float __cdecl tanhf(_In_ float x);
-#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) /* Make sure intrinsics don't get in our way */ #if defined(_M_AMD64) || defined(_M_ARM) || defined(_M_ARM64) #pragma function(acosf,asinf,atanf,atan2f,ceilf,cosf,coshf,expf,floorf,fmodf,logf,log10f,powf,sinf,sinhf,sqrtf,tanf,tanhf) @@ -269,7 +269,7 @@ _Check_return_ __CRT_INLINE long double ldexpl(_In_ long double x, _In_ int y) { _Check_return_ __CRT_INLINE long double modfl(_In_ long double x, _Out_ long double *y) { return (long double)modf((double)x, (double *)y); }
/* Support for some functions, not exported in MSVCRT */ -#if (_MSC_VER >= 1929) +#if (_MSC_VER >= 1929) && !defined(__clang__) _Check_return_ long lrint(_In_ double x); _Check_return_ long lrintf(_In_ float x); _Check_return_ long lrintl(_In_ long double x); diff --git a/sdk/include/crt/stdlib.h b/sdk/include/crt/stdlib.h index fc66c3a6874..b522f0c8648 100644 --- a/sdk/include/crt/stdlib.h +++ b/sdk/include/crt/stdlib.h @@ -1428,7 +1428,7 @@ extern "C" {
__MINGW_EXTENSION _Check_return_ lldiv_t __cdecl lldiv(_In_ long long, _In_ long long);
-#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) _Check_return_ long long __cdecl llabs(_In_ long long _j); #pragma function(llabs) #endif