https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dacbc603b691edf3c5b977...
commit dacbc603b691edf3c5b97726e300b79f1ba87859 Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Sat Jun 25 12:27:39 2022 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Thu Dec 1 15:21:59 2022 +0200
[CRT] Add simplistic fallback implementation of sincos to make GCC 11 happy --- sdk/lib/crt/math/math.cmake | 1 + sdk/lib/crt/math/sincos.c | 15 +++++++++++++++ sdk/lib/crt/msvcrtex.cmake | 1 + 3 files changed, 17 insertions(+)
diff --git a/sdk/lib/crt/math/math.cmake b/sdk/lib/crt/math/math.cmake index b54c21b0a42..a888242644e 100644 --- a/sdk/lib/crt/math/math.cmake +++ b/sdk/lib/crt/math/math.cmake @@ -6,6 +6,7 @@ list(APPEND LIBCNTPR_MATH_SOURCE math/abs.c math/div.c math/labs.c + math/sincos.c )
if(ARCH STREQUAL "i386") diff --git a/sdk/lib/crt/math/sincos.c b/sdk/lib/crt/math/sincos.c new file mode 100644 index 00000000000..6c22e452906 --- /dev/null +++ b/sdk/lib/crt/math/sincos.c @@ -0,0 +1,15 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: Fallback implementation of sincos + * COPYRIGHT: Copyright 2022 Timo Kreuzer timo.kreuzer@reactos.org + */ + +#include <math.h> + +// This is a very simplistic implementation to make GCC 11 happy +void sincos(double x, double *s, double *c) +{ + *s = sin(x); + *c = cos(x); +} diff --git a/sdk/lib/crt/msvcrtex.cmake b/sdk/lib/crt/msvcrtex.cmake index 272d844252e..d7a513012b4 100644 --- a/sdk/lib/crt/msvcrtex.cmake +++ b/sdk/lib/crt/msvcrtex.cmake @@ -3,6 +3,7 @@ include_directories(include/internal/mingw-w64)
list(APPEND MSVCRTEX_SOURCE ${CRT_STARTUP_SOURCE} + math/sincos.c misc/dbgrpt.cpp misc/fltused.c misc/isblank.c