include: Add support for building Wine with strict prototype checking.
diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c index 6196fac..5217c58 100644 --- a/dlls/msvfw32/msvideo_main.c +++ b/dlls/msvfw32/msvideo_main.c
@@ -472,7 +472,7 @@ /*********************************************************************** * ICOpenFunction [MSVFW32.@] */ -HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler) +HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, DRIVERPROC lpfnHandler) { ICOPEN icopen; WINE_HIC* whic;
diff --git a/include/mscoree.idl b/include/mscoree.idl index aed31da..19749fb 100644 --- a/include/mscoree.idl +++ b/include/mscoree.idl
@@ -27,7 +27,11 @@ cpp_quote("HRESULT WINAPI GetCORVersion(LPWSTR,DWORD,DWORD*);") cpp_quote("HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,DWORD,LPWSTR,DWORD,DWORD*,LPWSTR,DWORD,DWORD*);") cpp_quote("HRESULT WINAPI LoadLibraryShim(LPCWSTR,LPCWSTR,LPVOID,HMODULE*);") +cpp_quote("#ifdef WINE_STRICT_PROTOTYPES") +cpp_quote("typedef HRESULT (__stdcall *FLockClrVersionCallback)(void);") +cpp_quote("#else") cpp_quote("typedef HRESULT (__stdcall *FLockClrVersionCallback)();") +cpp_quote("#endif") cpp_quote("HRESULT WINAPI LockClrVersion(FLockClrVersionCallback,FLockClrVersionCallback*,FLockClrVersionCallback*);") typedef void* HDOMAINENUM;
diff --git a/include/rpcndr.h b/include/rpcndr.h index 78c9a47..8fee143 100644 --- a/include/rpcndr.h +++ b/include/rpcndr.h
@@ -383,7 +383,11 @@ typedef void (__RPC_API *STUB_THUNK)( PMIDL_STUB_MESSAGE ); +#ifdef WINE_STRICT_PROTOTYPES +typedef LONG (__RPC_API *SERVER_ROUTINE)(void); +#else typedef LONG (__RPC_API *SERVER_ROUTINE)(); +#endif typedef struct _MIDL_SERVER_INFO_ {
diff --git a/include/vfw.h b/include/vfw.h index ed62545..c0689fb 100644 --- a/include/vfw.h +++ b/include/vfw.h
@@ -499,7 +499,11 @@ BOOL VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags); LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, DWORD cb); HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode); +#ifdef WINE_STRICT_PROTOTYPES +HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, DRIVERPROC lpfnHandler); +#else HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler); +#endif LRESULT VFWAPI ICClose(HIC hic); HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags);
diff --git a/include/windef.h b/include/windef.h index 825255b..8f5ea30 100644 --- a/include/windef.h +++ b/include/windef.h
@@ -227,7 +227,8 @@ /* Note that Winelib is purely Win32. */ #ifdef __WINESRC__ -#define WINE_NO_UNICODE_MACROS +#define WINE_NO_UNICODE_MACROS 1 +#define WINE_STRICT_PROTOTYPES 1 #endif #ifdef WINE_NO_UNICODE_MACROS @@ -304,10 +305,15 @@ /* Callback function pointers types */ +#ifdef WINE_STRICT_PROTOTYPES +typedef INT_PTR (CALLBACK *FARPROC)(void); +typedef INT_PTR (CALLBACK *NEARPROC)(void); +typedef INT_PTR (CALLBACK *PROC)(void); +#else typedef INT_PTR (CALLBACK *FARPROC)(); typedef INT_PTR (CALLBACK *NEARPROC)(); typedef INT_PTR (CALLBACK *PROC)(); - +#endif /* Macros to split words and longs. */
diff --git a/include/wine/windef16.h b/include/wine/windef16.h index 8c58aae..40d96ee 100644 --- a/include/wine/windef16.h +++ b/include/wine/windef16.h
@@ -151,8 +151,6 @@ typedef LRESULT (CALLBACK *DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM); typedef BOOL16 (CALLBACK *DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM); typedef INT16 (CALLBACK *EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16); -typedef LRESULT (CALLBACK *FARPROC16)(); -typedef INT16 (CALLBACK *PROC16)(); typedef BOOL16 (CALLBACK *GRAYSTRINGPROC16)(HDC16,LPARAM,INT16); typedef LRESULT (CALLBACK *HOOKPROC16)(INT16,WPARAM16,LPARAM); typedef BOOL16 (CALLBACK *PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16); @@ -160,4 +158,12 @@ typedef LRESULT (CALLBACK *WNDENUMPROC16)(HWND16,LPARAM); typedef LRESULT (CALLBACK *WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM); +#ifdef WINE_STRICT_PROTOTYPES +typedef LRESULT (CALLBACK *FARPROC16)(void); +typedef INT16 (CALLBACK *PROC16)(void); +#else +typedef LRESULT (CALLBACK *FARPROC16)(); +typedef INT16 (CALLBACK *PROC16)(); +#endif + #endif /* __WINE_WINDEF16_H */