diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c index 0942e880fc0..9fd80d23056 100644 --- a/dlls/gdiplus/tests/brush.c +++ b/dlls/gdiplus/tests/brush.c @@ -1273,6 +1273,13 @@ START_TEST(brush) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c index 704f70e58b6..bac80adbdb0 100644 --- a/dlls/gdiplus/tests/customlinecap.c +++ b/dlls/gdiplus/tests/customlinecap.c @@ -315,6 +315,13 @@ START_TEST(customlinecap) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index dd624a42c93..2cae48192e4 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -1114,6 +1114,13 @@ START_TEST(font) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 529f1a23e54..4dcfac8c19a 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -6154,6 +6154,13 @@ START_TEST(graphics) struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; WNDCLASSA class; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); memset( &class, 0, sizeof(class) ); class.lpszClassName = "gdiplus_test"; diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 2a94e845c92..9a6dde3bd85 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1329,6 +1329,13 @@ START_TEST(graphicspath) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 0ef72b249e5..225dc5461ba 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -4971,6 +4971,13 @@ START_TEST(image) HMODULE mod = GetModuleHandleA("gdiplus.dll"); struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/matrix.c b/dlls/gdiplus/tests/matrix.c index a2e0595f8c4..1e4f48d8861 100644 --- a/dlls/gdiplus/tests/matrix.c +++ b/dlls/gdiplus/tests/matrix.c @@ -343,6 +343,13 @@ START_TEST(matrix) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index 3b6bced635a..26716c40404 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -2745,6 +2745,13 @@ START_TEST(metafile) ULONG_PTR gdiplusToken; int myARGC; char **myARGV; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/pathiterator.c b/dlls/gdiplus/tests/pathiterator.c index e606be3d87a..3f6292c6ccc 100644 --- a/dlls/gdiplus/tests/pathiterator.c +++ b/dlls/gdiplus/tests/pathiterator.c @@ -559,6 +559,13 @@ START_TEST(pathiterator) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c index 19a180b0585..ded6e642eb0 100644 --- a/dlls/gdiplus/tests/pen.c +++ b/dlls/gdiplus/tests/pen.c @@ -455,6 +455,13 @@ START_TEST(pen) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); test_startup(); diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c index 2bf447010ed..06c47d98ee2 100644 --- a/dlls/gdiplus/tests/region.c +++ b/dlls/gdiplus/tests/region.c @@ -2262,6 +2262,13 @@ START_TEST(region) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/stringformat.c b/dlls/gdiplus/tests/stringformat.c index 0774e1b79d0..71fb860e474 100644 --- a/dlls/gdiplus/tests/stringformat.c +++ b/dlls/gdiplus/tests/stringformat.c @@ -438,6 +438,13 @@ START_TEST(stringformat) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL;