Alexandre Julliard : include: Add support for building Wine with strict prototype checking.

Alexandre Julliard julliard at winehq.org
Tue Oct 6 10:35:51 CDT 2009


Module: wine
Branch: master
Commit: 0e67f65cab65fb157adbe6196676279d71453e3b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0e67f65cab65fb157adbe6196676279d71453e3b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct  6 12:30:49 2009 +0200

include: Add support for building Wine with strict prototype checking.

---

 dlls/msvfw32/msvideo_main.c |    2 +-
 include/mscoree.idl         |    4 ++++
 include/rpcndr.h            |    4 ++++
 include/vfw.h               |    4 ++++
 include/windef.h            |   10 ++++++++--
 include/wine/windef16.h     |   10 ++++++++--
 6 files changed, 29 insertions(+), 5 deletions(-)

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 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
 /***********************************************************************
  *		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 GetCORSystemDirectory(LPWSTR,DWORD,DWORD*);")
 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 struct _MIDL_SYNTAX_INFO
 
 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  ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR
 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 @@ typedef unsigned int    ULONG,      *PULONG;
 /* 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 @@ typedef HICON HCURSOR;
 
 /* 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 struct
 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 VOID    (CALLBACK *TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
 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 */




More information about the wine-cvs mailing list