ole32: fix compilation with mingw32-gcc >= 4.6.0
Jérôme Gardou
jerome.gardou at reactos.org
Thu Dec 13 09:58:38 CST 2012
---
dlls/ole32/stg_prop.c | 14 +++++++-------
dlls/ole32/tests/propvariant.c | 8 ++++----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index c2626cf..bad5643 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -1035,12 +1035,12 @@ static HRESULT
PropertyStorage_ReadDictionary(PropertyStorage_impl *This, }
#ifdef __i386__
-#define __thiscall __stdcall
+#define __thiscall_wrapper __stdcall
#else
-#define __thiscall __cdecl
+#define __thiscall_wrapper __cdecl
#endif
-static __thiscall void* Allocate_CoTaskMemAlloc(void *userdata, ULONG
size) +static __thiscall_wrapper void* Allocate_CoTaskMemAlloc(void
*userdata, ULONG size) {
return CoTaskMemAlloc(size);
}
@@ -1049,7 +1049,7 @@ static __thiscall void*
Allocate_CoTaskMemAlloc(void *userdata, ULONG size)
* end of the buffer.
*/
static HRESULT PropertyStorage_ReadProperty(PROPVARIANT *prop, const
BYTE *data,
- UINT codepage, void* (__thiscall *allocate)(void *userdata, ULONG
size), void *allocate_data)
+ UINT codepage, void* (__thiscall_wrapper *allocate)(void
*userdata, ULONG size), void *allocate_data) {
HRESULT hr = S_OK;
@@ -2738,13 +2738,13 @@ end:
"jmp *(4*(" #num "))(%eax)" )
DEFINE_STDCALL_WRAPPER(0,Allocate_PMemoryAllocator,8)
-extern void* __thiscall Allocate_PMemoryAllocator(void *this, ULONG
cbSize); +extern void* __stdcall Allocate_PMemoryAllocator(void *this,
ULONG cbSize);
#else
-static void* __thiscall Allocate_PMemoryAllocator(void *this, ULONG
cbSize) +static void* __cdecl Allocate_PMemoryAllocator(void *this,
ULONG cbSize) {
- void* (__thiscall *fn)(void*,ULONG) = **(void***)this;
+ void* (__cdecl *fn)(void*,ULONG) = **(void***)this;
return fn(this, cbSize);
}
diff --git a/dlls/ole32/tests/propvariant.c
b/dlls/ole32/tests/propvariant.c index 4d9a81b..3f49980 100644
--- a/dlls/ole32/tests/propvariant.c
+++ b/dlls/ole32/tests/propvariant.c
@@ -255,17 +255,17 @@ typedef struct _PMemoryAllocator {
} PMemoryAllocator;
#ifdef __i386__
-#define __thiscall __stdcall
+#define __thiscall_wrapper __stdcall
#else
-#define __thiscall __cdecl
+#define __thiscall_wrapper __cdecl
#endif
-static void * __thiscall PMemoryAllocator_Allocate(PMemoryAllocator
*_this, ULONG cbSize) +static void * __thiscall_wrapper
PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize) {
return CoTaskMemAlloc(cbSize);
}
-static void __thiscall PMemoryAllocator_Free(PMemoryAllocator *_this,
void *pv) +static void __thiscall_wrapper
PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv) {
CoTaskMemFree(pv);
}
--
1.7.10.4
More information about the wine-patches
mailing list