Module: wine Branch: master Commit: f0605758e0b6762d5c2ad173a2026fe8a256a702 URL: https://gitlab.winehq.org/wine/wine/-/commit/f0605758e0b6762d5c2ad173a2026fe...
Author: Alex Henrie alexhenrie24@gmail.com Date: Mon Nov 21 08:07:22 2022 -0700
dinput/tests: Avoid using GCC's typeof extension.
typeof is not available in MSVC.
---
dlls/dinput/tests/force_feedback.c | 12 +++++------- dlls/dinput/tests/hotplug.c | 10 ++++------ dlls/dinput/tests/joystick8.c | 12 +++++------- 3 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 8fb15e38f13..ba37320e9f0 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -48,13 +48,11 @@ #include "windows.gaming.input.forcefeedback.h" #undef Size
-#define MAKE_FUNC(f) static typeof(f) *p ## f -MAKE_FUNC( RoGetActivationFactory ); -MAKE_FUNC( RoInitialize ); -MAKE_FUNC( WindowsCreateString ); -MAKE_FUNC( WindowsDeleteString ); -MAKE_FUNC( WindowsGetStringRawBuffer ); -#undef MAKE_FUNC +static HRESULT WINAPI (*pRoGetActivationFactory)( HSTRING, REFIID, void** ); +static HRESULT WINAPI (*pRoInitialize)( RO_INIT_TYPE ); +static HRESULT WINAPI (*pWindowsCreateString)( const WCHAR*, UINT32, HSTRING* ); +static HRESULT WINAPI (*pWindowsDeleteString)( HSTRING str ); +static const WCHAR* WINAPI (*pWindowsGetStringRawBuffer)( HSTRING, UINT32* );
static BOOL load_combase_functions(void) { diff --git a/dlls/dinput/tests/hotplug.c b/dlls/dinput/tests/hotplug.c index 9896e7b480e..e915d04745a 100644 --- a/dlls/dinput/tests/hotplug.c +++ b/dlls/dinput/tests/hotplug.c @@ -50,12 +50,10 @@ #include "windows.gaming.input.custom.h" #undef Size
-#define MAKE_FUNC(f) static typeof(f) *p ## f -MAKE_FUNC( RoGetActivationFactory ); -MAKE_FUNC( RoInitialize ); -MAKE_FUNC( WindowsCreateString ); -MAKE_FUNC( WindowsDeleteString ); -#undef MAKE_FUNC +static HRESULT WINAPI (*pRoGetActivationFactory)( HSTRING, REFIID, void** ); +static HRESULT WINAPI (*pRoInitialize)( RO_INIT_TYPE ); +static HRESULT WINAPI (*pWindowsCreateString)( const WCHAR*, UINT32, HSTRING* ); +static HRESULT WINAPI (*pWindowsDeleteString)( HSTRING str );
static BOOL load_combase_functions(void) { diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index 0981d917b2a..f568c9298c6 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -47,13 +47,11 @@ #include "windows.gaming.input.h" #undef Size
-#define MAKE_FUNC(f) static typeof(f) *p ## f -MAKE_FUNC( RoGetActivationFactory ); -MAKE_FUNC( RoInitialize ); -MAKE_FUNC( WindowsCreateString ); -MAKE_FUNC( WindowsDeleteString ); -MAKE_FUNC( WindowsGetStringRawBuffer ); -#undef MAKE_FUNC +static HRESULT WINAPI (*pRoGetActivationFactory)( HSTRING, REFIID, void** ); +static HRESULT WINAPI (*pRoInitialize)( RO_INIT_TYPE ); +static HRESULT WINAPI (*pWindowsCreateString)( const WCHAR*, UINT32, HSTRING* ); +static HRESULT WINAPI (*pWindowsDeleteString)( HSTRING str ); +static const WCHAR* WINAPI (*pWindowsGetStringRawBuffer)( HSTRING, UINT32* );
static BOOL load_combase_functions(void) {