Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/riched20/txthost.c | 86 ++++++++++++++++++++--------------------- dlls/riched20/txtsrv.c | 4 +- 2 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index b479bde81b..d929a1a0a3 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -501,9 +501,9 @@ DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *i
#ifdef __i386__ /* thiscall functions are i386-specific */
-#define THISCALL(func) __thiscall_ ## func +#define THISCALL(func) (void *) __thiscall_ ## func #define DEFINE_THISCALL_WRAPPER(func,args) \ - extern typeof(func) THISCALL(func); \ + extern void * __thiscall_ ## func(void); \ __ASM_STDCALL_FUNC(__thiscall_ ## func, args, \ "popl %eax\n\t" \ "pushl %ecx\n\t" \ @@ -559,9 +559,9 @@ DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetSelectionBarWidth,8)
#ifdef __i386__ /* thiscall functions are i386-specific */
-#define STDCALL(func) __stdcall_ ## func +#define STDCALL(func) (void *) __stdcall_ ## func #define DEFINE_STDCALL_WRAPPER(num,func,args) \ - extern typeof(func) __stdcall_ ## func; \ + extern void * __stdcall_ ## func(void); \ __ASM_STDCALL_FUNC(__stdcall_ ## func, args, \ "popl %eax\n\t" \ "popl %ecx\n\t" \ @@ -613,45 +613,45 @@ const ITextHostVtbl itextHostStdcallVtbl = { NULL, NULL, NULL, - __stdcall_ITextHostImpl_TxGetDC, - __stdcall_ITextHostImpl_TxReleaseDC, - __stdcall_ITextHostImpl_TxShowScrollBar, - __stdcall_ITextHostImpl_TxEnableScrollBar, - __stdcall_ITextHostImpl_TxSetScrollRange, - __stdcall_ITextHostImpl_TxSetScrollPos, - __stdcall_ITextHostImpl_TxInvalidateRect, - __stdcall_ITextHostImpl_TxViewChange, - __stdcall_ITextHostImpl_TxCreateCaret, - __stdcall_ITextHostImpl_TxShowCaret, - __stdcall_ITextHostImpl_TxSetCaretPos, - __stdcall_ITextHostImpl_TxSetTimer, - __stdcall_ITextHostImpl_TxKillTimer, - __stdcall_ITextHostImpl_TxScrollWindowEx, - __stdcall_ITextHostImpl_TxSetCapture, - __stdcall_ITextHostImpl_TxSetFocus, - __stdcall_ITextHostImpl_TxSetCursor, - __stdcall_ITextHostImpl_TxScreenToClient, - __stdcall_ITextHostImpl_TxClientToScreen, - __stdcall_ITextHostImpl_TxActivate, - __stdcall_ITextHostImpl_TxDeactivate, - __stdcall_ITextHostImpl_TxGetClientRect, - __stdcall_ITextHostImpl_TxGetViewInset, - __stdcall_ITextHostImpl_TxGetCharFormat, - __stdcall_ITextHostImpl_TxGetParaFormat, - __stdcall_ITextHostImpl_TxGetSysColor, - __stdcall_ITextHostImpl_TxGetBackStyle, - __stdcall_ITextHostImpl_TxGetMaxLength, - __stdcall_ITextHostImpl_TxGetScrollBars, - __stdcall_ITextHostImpl_TxGetPasswordChar, - __stdcall_ITextHostImpl_TxGetAcceleratorPos, - __stdcall_ITextHostImpl_TxGetExtent, - __stdcall_ITextHostImpl_OnTxCharFormatChange, - __stdcall_ITextHostImpl_OnTxParaFormatChange, - __stdcall_ITextHostImpl_TxGetPropertyBits, - __stdcall_ITextHostImpl_TxNotify, - __stdcall_ITextHostImpl_TxImmGetContext, - __stdcall_ITextHostImpl_TxImmReleaseContext, - __stdcall_ITextHostImpl_TxGetSelectionBarWidth, + STDCALL(ITextHostImpl_TxGetDC), + STDCALL(ITextHostImpl_TxReleaseDC), + STDCALL(ITextHostImpl_TxShowScrollBar), + STDCALL(ITextHostImpl_TxEnableScrollBar), + STDCALL(ITextHostImpl_TxSetScrollRange), + STDCALL(ITextHostImpl_TxSetScrollPos), + STDCALL(ITextHostImpl_TxInvalidateRect), + STDCALL(ITextHostImpl_TxViewChange), + STDCALL(ITextHostImpl_TxCreateCaret), + STDCALL(ITextHostImpl_TxShowCaret), + STDCALL(ITextHostImpl_TxSetCaretPos), + STDCALL(ITextHostImpl_TxSetTimer), + STDCALL(ITextHostImpl_TxKillTimer), + STDCALL(ITextHostImpl_TxScrollWindowEx), + STDCALL(ITextHostImpl_TxSetCapture), + STDCALL(ITextHostImpl_TxSetFocus), + STDCALL(ITextHostImpl_TxSetCursor), + STDCALL(ITextHostImpl_TxScreenToClient), + STDCALL(ITextHostImpl_TxClientToScreen), + STDCALL(ITextHostImpl_TxActivate), + STDCALL(ITextHostImpl_TxDeactivate), + STDCALL(ITextHostImpl_TxGetClientRect), + STDCALL(ITextHostImpl_TxGetViewInset), + STDCALL(ITextHostImpl_TxGetCharFormat), + STDCALL(ITextHostImpl_TxGetParaFormat), + STDCALL(ITextHostImpl_TxGetSysColor), + STDCALL(ITextHostImpl_TxGetBackStyle), + STDCALL(ITextHostImpl_TxGetMaxLength), + STDCALL(ITextHostImpl_TxGetScrollBars), + STDCALL(ITextHostImpl_TxGetPasswordChar), + STDCALL(ITextHostImpl_TxGetAcceleratorPos), + STDCALL(ITextHostImpl_TxGetExtent), + STDCALL(ITextHostImpl_OnTxCharFormatChange), + STDCALL(ITextHostImpl_OnTxParaFormatChange), + STDCALL(ITextHostImpl_TxGetPropertyBits), + STDCALL(ITextHostImpl_TxNotify), + STDCALL(ITextHostImpl_TxImmGetContext), + STDCALL(ITextHostImpl_TxImmReleaseContext), + STDCALL(ITextHostImpl_TxGetSelectionBarWidth), };
#endif /* __i386__ */ diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index ee65621b1d..8cbe77431b 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -35,9 +35,9 @@
#ifdef __i386__ /* thiscall functions are i386-specific */
-#define THISCALL(func) __thiscall_ ## func +#define THISCALL(func) (void *) __thiscall_ ## func #define DEFINE_THISCALL_WRAPPER(func,args) \ - extern typeof(func) THISCALL(func); \ + extern void * __thiscall_ ## func(void); \ __ASM_STDCALL_FUNC(__thiscall_ ## func, args, \ "popl %eax\n\t" \ "pushl %ecx\n\t" \
On Thu, Sep 20, 2018 at 09:34:07PM -0600, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/riched20/txthost.c | 86 ++++++++++++++++++++--------------------- dlls/riched20/txtsrv.c | 4 +- 2 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index b479bde81b..d929a1a0a3 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -501,9 +501,9 @@ DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *i
#ifdef __i386__ /* thiscall functions are i386-specific */
-#define THISCALL(func) __thiscall_ ## func +#define THISCALL(func) (void *) __thiscall_ ## func #define DEFINE_THISCALL_WRAPPER(func,args) \
- extern typeof(func) THISCALL(func); \
- extern void * __thiscall_ ## func(void); \ __ASM_STDCALL_FUNC(__thiscall_ ## func, args, \ "popl %eax\n\t" \ "pushl %ecx\n\t" \
We lose type-checking when assigning function ptrs to vtbl entries, which is unfortunate.
Signed-off-by: Huw Davies huw@codeweavers.com
On Mon, Sep 24, 2018 at 1:58 AM Huw Davies huw@codeweavers.com wrote:
On Thu, Sep 20, 2018 at 09:34:07PM -0600, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/riched20/txthost.c | 86 ++++++++++++++++++++--------------------- dlls/riched20/txtsrv.c | 4 +- 2 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index b479bde81b..d929a1a0a3 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -501,9 +501,9 @@ DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *i
#ifdef __i386__ /* thiscall functions are i386-specific */
-#define THISCALL(func) __thiscall_ ## func +#define THISCALL(func) (void *) __thiscall_ ## func #define DEFINE_THISCALL_WRAPPER(func,args) \
- extern typeof(func) THISCALL(func); \
- extern void * __thiscall_ ## func(void); \ __ASM_STDCALL_FUNC(__thiscall_ ## func, args, \ "popl %eax\n\t" \ "pushl %ecx\n\t" \
We lose type-checking when assigning function ptrs to vtbl entries, which is unfortunate.
I think we'll be OK because there's still type-checking when compiling 64-bit Wine.
-Alex
Alex Henrie alexhenrie24@gmail.com writes:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/riched20/txthost.c | 86 ++++++++++++++++++++--------------------- dlls/riched20/txtsrv.c | 4 +- 2 files changed, 45 insertions(+), 45 deletions(-)
It breaks the Windows build:
/usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xec): undefined reference to `__stdcall_ITextHostImpl_TxGetDC' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf0): undefined reference to `__stdcall_ITextHostImpl_TxReleaseDC' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf4): undefined reference to `__stdcall_ITextHostImpl_TxShowScrollBar' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf8): undefined reference to `__stdcall_ITextHostImpl_TxEnableScrollBar' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xfc): undefined reference to `__stdcall_ITextHostImpl_TxSetScrollRange' etc.
On Mon, Sep 24, 2018 at 10:19 AM Alexandre Julliard julliard@winehq.org wrote:
Alex Henrie alexhenrie24@gmail.com writes:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/riched20/txthost.c | 86 ++++++++++++++++++++--------------------- dlls/riched20/txtsrv.c | 4 +- 2 files changed, 45 insertions(+), 45 deletions(-)
It breaks the Windows build:
/usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xec): undefined reference to `__stdcall_ITextHostImpl_TxGetDC' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf0): undefined reference to `__stdcall_ITextHostImpl_TxReleaseDC' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf4): undefined reference to `__stdcall_ITextHostImpl_TxShowScrollBar' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf8): undefined reference to `__stdcall_ITextHostImpl_TxEnableScrollBar' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xfc): undefined reference to `__stdcall_ITextHostImpl_TxSetScrollRange' etc.
How are you compiling Wine? Loosely following https://wiki.winehq.org/Cygwin_and_More#Cross-compiling_with_mingw-w64, I tried `../wine/configure --host=i686-w64-mingw32 --with-wine-tools=../wine-build-native --without-freetype --without-x --without-png && make` and it works for me.
-Alex
Alex Henrie alexhenrie24@gmail.com writes:
On Mon, Sep 24, 2018 at 10:19 AM Alexandre Julliard julliard@winehq.org wrote:
Alex Henrie alexhenrie24@gmail.com writes:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/riched20/txthost.c | 86 ++++++++++++++++++++--------------------- dlls/riched20/txtsrv.c | 4 +- 2 files changed, 45 insertions(+), 45 deletions(-)
It breaks the Windows build:
/usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xec): undefined reference to `__stdcall_ITextHostImpl_TxGetDC' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf0): undefined reference to `__stdcall_ITextHostImpl_TxReleaseDC' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf4): undefined reference to `__stdcall_ITextHostImpl_TxShowScrollBar' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xf8): undefined reference to `__stdcall_ITextHostImpl_TxEnableScrollBar' /usr/bin/i686-w64-mingw32-ld: txthost.o:txthost.c:(.rdata+0xfc): undefined reference to `__stdcall_ITextHostImpl_TxSetScrollRange' etc.
How are you compiling Wine? Loosely following https://wiki.winehq.org/Cygwin_and_More#Cross-compiling_with_mingw-w64, I tried `../wine/configure --host=i686-w64-mingw32 --with-wine-tools=../wine-build-native --without-freetype --without-x --without-png && make` and it works for me.
You'd probably get linker warnings. You can use --disable-stdcall-fixup to turn them into errors.