Author: mjansen Date: Sat Jul 23 20:35:11 2016 New Revision: 71985 URL: http://svn.reactos.org/svn/reactos?rev=71985&view=rev Log: [CRT][GDI32] Introduce atan2 library, use it for gdi32 to fix a crash. CORE-11521 As suggested by Thomas :)
Modified: trunk/reactos/sdk/lib/crt/CMakeLists.txt trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c Modified: trunk/reactos/sdk/lib/crt/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/CMakeLists.txt?rev=71985&r1=71984&r2=71985&view=diff ============================================================================== --- trunk/reactos/sdk/lib/crt/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/CMakeLists.txt [iso-8859-1] Sat Jul 23 20:35:11 2016 @@ -66,3 +66,19 @@ string/wctype.c) add_target_compile_definitions(strtol _LIBCNT_) add_dependencies(strtol psdk) + + +if(ARCH STREQUAL "i386") + list(APPEND ATAN2_ASM_SOURCE math/i386/atan2_asm.s) +elseif(ARCH STREQUAL "amd64") + list(APPEND ATAN2_ASM_SOURCE math/amd64/atan2.S) +elseif(ARCH STREQUAL "arm") + list(APPEND ATAN2_ASM_SOURCE math/arm/atan2.s) +endif() + +add_asm_files(atan2_asm ${ATAN2_ASM_SOURCE}) +add_library(atan2 ${atan2_asm}) +set_target_properties(atan2 PROPERTIES LINKER_LANGUAGE "C") +add_dependencies(atan2 asm) + + Modified: trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt?rev=71985&r1=71984&r2=71985&view=diff ============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt [iso-8859-1] Sat Jul 23 20:35:11 2016 @@ -61,6 +61,7 @@ win32ksys dxguid msvcrtex + atan2 ${PSEH_LIB}) add_importlibs(gdi32 user32 advapi32 kernel32 ntdll) Modified: trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c?rev=71985&r1=71984&r2=71985&view=diff ============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c [iso-8859-1] Sat Jul 23 20:35:11 2016 @@ -519,23 +519,6 @@ { DbgRaiseAssertionFailure(); } - -#if defined(_MSC_VER) && (DBG != 1) - -/* MSVC uses its own in this case. */ -#else - -double -__cdecl -atan2( - double y, - double x) -{ - __debugbreak(); - return 0.; -} - -#endif /******************************************************************************/