It seems that you are right. void (WINAPI *foo)(void); works fine with gcc. Hmm, must done something wrong then I tested it some year ago. All of the forms: (1) void WINAPI (*foo)(void); (2) void (* WINAPI foo)(void); (3) void (WINAPI *foo)(void); Seems to work with gcc. Even with gcc 2.7.x. However only form (3) works with Microsoft Visual C. So here is a patch that changes (1) and (2) to (3). It is not everything, far from it, but its a start. Will be back with the rest if you apply this patch. ---8<--- *** msvc * include/callback.h, include/commctrl.h, include/commdlg.h, include/d3dcaps.h, include/d3dhal.h, include/d3dtypes.h, include/ddeml.h, include/ddraw.h, include/ddrawi.h, include/dinput.h, include/dplay.h, include/dplobby.h, include/dsound.h, include/imagehlp.h, include/imm.h, include/miscemu.h, include/mmsystem.h, include/msacm.h, include/netspi.h, include/ole.h, include/ole2.h, include/oledlg.h, include/prsht.h, include/richedit.h, include/setupapi.h, include/shlobj.h, include/shlwapi.h, include/tapi.h, include/task.h, include/vfw.h, include/winbase.h, include/windef.h, include/wine/exception.h, include/wine/mmsystem16.h, include/wine/obj_base.h, include/wine/obj_oleaut.h, include/wine/obj_oleview.h, include/wine/windef16.h, include/wine/wingdi16.h, include/wine/winuser16.h, include/wingdi.h, include/wininet.h, include/winnetwk.h, include/winnls.h, include/winnt.h, include/winsock2.h, include/winsvc.h, include/winuser.h, include/ws2spi.h: Move __stdcall/__cdecl to the right place. *** msvc2 * tools/winebuild/spec16.c: Move __stdcall/__cdecl to the right place.
Attachment:
msvc.diff.gz
Description: Binary data
Attachment:
msvc2.diff
Description: Binary data