diff options
author | uid56437 <none@none> | 2001-07-04 14:05:09 +0000 |
---|---|---|
committer | uid56437 <none@none> | 2001-07-04 14:05:09 +0000 |
commit | 0342d76c613911b282e14a1188326075d1d43bca (patch) | |
tree | 0547e6dd8fa7fa400a06d793642cd03855d6ccc5 /src/libw32dll/wine/driver.c | |
parent | 2806c8c5cd03db19886b75fa05b6e50d7d4815e1 (diff) | |
download | xine-lib-0342d76c613911b282e14a1188326075d1d43bca.tar.gz xine-lib-0342d76c613911b282e14a1188326075d1d43bca.tar.bz2 |
Add prototypes for all functions in wine/*, to catch __stdcall function
attribute mismatches between function prototypes and function definitions.
Such a __stdcall mismatch can corrupt the cpu's stack, because both the
caller and the callee clean up function parameter from the stack (or none
of them removes the function parameters)
wine/* should be less sensitive to optimzation options due to this change.
CVS patchset: 245
CVS date: 2001/07/04 14:05:09
Diffstat (limited to 'src/libw32dll/wine/driver.c')
-rw-r--r-- | src/libw32dll/wine/driver.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/libw32dll/wine/driver.c b/src/libw32dll/wine/driver.c index e0820d4c8..53d82ccb5 100644 --- a/src/libw32dll/wine/driver.c +++ b/src/libw32dll/wine/driver.c @@ -11,14 +11,17 @@ #include "pe_image.h" #include "winreg.h" #include "vfw.h" +#include "win32.h" #include "registry.h" #ifdef __FreeBSD__ #include <sys/time.h> #endif -//#define WIN32_PATH "/usr/lib/win32" - +#if 1 +#define STORE_ALL /**/ +#define REST_ALL /**/ +#else #define STORE_ALL \ __asm__ ( \ "push %%ebx\n\t" \ @@ -34,20 +37,10 @@ "pop %%edx\n\t" \ "pop %%ecx\n\t" \ "pop %%ebx\n\t"::) +#endif -typedef struct { - UINT uDriverSignature; - HINSTANCE hDriverModule; - DRIVERPROC DriverProc; - DWORD dwDriverID; -} DRVR; - -typedef DRVR *PDRVR; -typedef DRVR *NPDRVR; -typedef DRVR *LPDRVR; - static DWORD dwDrvID = 0; @@ -115,8 +108,8 @@ void DrvClose(HDRVR hdrvr) } -#ifndef STATIC_WIN32_PATH -char* def_path=WIN32_PATH; // path to codecs +#ifdef WIN32_PATH +char* def_path=WIN32_PATH; // path to codecs #else char* def_path="/usr/lib/win32"; // path to codecs #endif @@ -125,7 +118,7 @@ char* win32_codec_name=NULL; // must be set before calling DrvOpen() !!! HDRVR DrvOpen(LPARAM lParam2) { - ICOPEN *icopen=lParam2; + ICOPEN *icopen=(ICOPEN*)lParam2; UINT uDrvResult; HDRVR hDriver; NPDRVR npDriver; |