diff --git a/sdk/lib/ucrt/math/_dclass.c b/sdk/lib/crt/math/_dclass.c similarity index 77% rename from sdk/lib/ucrt/math/_dclass.c rename to sdk/lib/crt/math/_dclass.c index 076f495ca30..9bb10b6cbb3 100644 --- a/sdk/lib/ucrt/math/_dclass.c +++ b/sdk/lib/crt/math/_dclass.c @@ -1,17 +1,15 @@ -// -// _dclass.c -// -// Copyright (c) 2024 Timo Kreuzer -// -// Implementation of _dclass. -// -// SPDX-License-Identifier: MIT -// +/* + * PROJECT: ReactOS CRT + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: Implementation of _dclass. + * COPYRIGHT: Copyright 2025 Timo Kreuzer + */ #include #include #if defined(_MSC_VER) && (_MSC_VER >= 1922) +_Check_return_ short __cdecl _dclass(_In_ double _X); #pragma function(_dclass) #endif diff --git a/sdk/lib/crt/math/_dtest.c b/sdk/lib/crt/math/_dtest.c new file mode 100644 index 00000000000..fcd96639373 --- /dev/null +++ b/sdk/lib/crt/math/_dtest.c @@ -0,0 +1,23 @@ +/* + * PROJECT: ReactOS CRT + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: Implementation of _dtest. + * COPYRIGHT: Copyright 2025 Timo Kreuzer + */ + +#include + +_Check_return_ short __cdecl _dclass(_In_ double _X); + +#if defined(_MSC_VER) && (_MSC_VER >= 1922) +_Check_return_ short __cdecl _dtest(_In_ double* _Px); +#pragma function(_dtest) +#endif + +_Check_return_ +short +__cdecl +_dtest(_In_ double* _Px) +{ + return _dclass(*_Px); +} diff --git a/sdk/lib/ucrt/math/_fdclass.c b/sdk/lib/crt/math/_fdclass.c similarity index 77% rename from sdk/lib/ucrt/math/_fdclass.c rename to sdk/lib/crt/math/_fdclass.c index 39190f82fcb..f0b992927ff 100644 --- a/sdk/lib/ucrt/math/_fdclass.c +++ b/sdk/lib/crt/math/_fdclass.c @@ -1,17 +1,15 @@ -// -// _fdclass.c -// -// Copyright (c) 2024 Timo Kreuzer -// -// Implementation of _fdclass. -// -// SPDX-License-Identifier: MIT -// +/* + * PROJECT: ReactOS CRT + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: Implementation of _fdclass. + * COPYRIGHT: Copyright 2025 Timo Kreuzer + */ #include #include #if defined(_MSC_VER) && (_MSC_VER >= 1922) +_Check_return_ short __cdecl _fdclass(_In_ float _X); #pragma function(_fdclass) #endif diff --git a/sdk/lib/crt/math/_fdtest.c b/sdk/lib/crt/math/_fdtest.c new file mode 100644 index 00000000000..2768f39526e --- /dev/null +++ b/sdk/lib/crt/math/_fdtest.c @@ -0,0 +1,23 @@ +/* + * PROJECT: ReactOS CRT + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: Implementation of _fdtest. + * COPYRIGHT: Copyright 2025 Timo Kreuzer + */ + +#include + +_Check_return_ short __cdecl _fdclass(_In_ float _X); + +#if defined(_MSC_VER) && (_MSC_VER >= 1922) +_Check_return_ short __cdecl _fdtest(_In_ float* _Px); +#pragma function(_fdtest) +#endif + +_Check_return_ +short +__cdecl +_fdtest(_In_ float* _Px) +{ + return _fdclass(*_Px); +} diff --git a/sdk/lib/crt/math/math.cmake b/sdk/lib/crt/math/math.cmake index 305f4b97528..7087d2f6849 100644 --- a/sdk/lib/crt/math/math.cmake +++ b/sdk/lib/crt/math/math.cmake @@ -3,8 +3,12 @@ include_directories(libm_sse2) list(APPEND LIBCNTPR_MATH_SOURCE math/_chgsignf.c + math/_dclass.c math/_dsign.c + math/_dtest.c + math/_fdclass.c math/_fdsign.c + math/_fdtest.c math/_finite.c math/_finitef.c math/_isnan.c diff --git a/sdk/lib/ucrt/math/_dtest.c b/sdk/lib/ucrt/math/_dtest.c deleted file mode 100644 index fb659f17739..00000000000 --- a/sdk/lib/ucrt/math/_dtest.c +++ /dev/null @@ -1,23 +0,0 @@ -// -// _dtest.c -// -// Copyright (c) 2024 Timo Kreuzer -// -// Implementation of _dtest. -// -// SPDX-License-Identifier: MIT -// - -#include - -#if defined(_MSC_VER) && (_MSC_VER >= 1922) -#pragma function(_dtest) -#endif - -_Check_return_ -short -__cdecl -_dtest(_In_ double* _Px) -{ - return _dclass(*_Px); -} diff --git a/sdk/lib/ucrt/math/_fdtest.c b/sdk/lib/ucrt/math/_fdtest.c deleted file mode 100644 index 756fd89cbdd..00000000000 --- a/sdk/lib/ucrt/math/_fdtest.c +++ /dev/null @@ -1,23 +0,0 @@ -// -// _fdtest.c -// -// Copyright (c) 2024 Timo Kreuzer -// -// Implementation of _fdtest. -// -// SPDX-License-Identifier: MIT -// - -#include - -#if defined(_MSC_VER) && (_MSC_VER >= 1922) -#pragma function(_fdtest) -#endif - -_Check_return_ -short -__cdecl -_fdtest(_In_ float* _Px) -{ - return _fdclass(*_Px); -} diff --git a/sdk/lib/ucrt/math/math.cmake b/sdk/lib/ucrt/math/math.cmake index 06085f852f7..4eadd9f107d 100644 --- a/sdk/lib/ucrt/math/math.cmake +++ b/sdk/lib/ucrt/math/math.cmake @@ -1,8 +1,4 @@ list(APPEND UCRT_MATH_SOURCES - math/_dclass.c - math/_dtest.c - math/_fdclass.c - math/_fdtest.c math/matherr.cpp )