diff options
author | jkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-12 15:27:48 +0000 |
---|---|---|
committer | jkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-12 15:27:48 +0000 |
commit | a26b39974fb992cb400c6e9aff0a02737c2f4f59 (patch) | |
tree | bd6802ff279bb9ed79a9dec7f367861309741686 /loader/driver.c | |
parent | 009d2b0dc7ce5d7089bdb4136d1b575b115981d0 (diff) | |
download | mpv-a26b39974fb992cb400c6e9aff0a02737c2f4f59.tar.bz2 mpv-a26b39974fb992cb400c6e9aff0a02737c2f4f59.tar.xz |
Add prototypes to wine/loader stuff, so that we can catch __stdcall function
attribute mismatch between caller/caller. wine/loader is less sensitive to
optimization now. (now that avifile-0.6 has the same patch installed, we're
a bit closer to their CVS tree)
Speed up win32 "QueryPerformanceFrequency" emulation on solaris.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1308 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/driver.c')
-rw-r--r-- | loader/driver.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/loader/driver.c b/loader/driver.c index 6133409680..e7b870402d 100644 --- a/loader/driver.c +++ b/loader/driver.c @@ -1,29 +1,38 @@ #include <config.h> #include <stdio.h> - #ifdef HAVE_MALLOC_H #include <malloc.h> -#else +#endif #include <stdlib.h> +#ifdef __FreeBSD__ +#include <sys/time.h> #endif +#include <win32.h> #include <wine/driver.h> #include <wine/pe_image.h> #include <wine/winreg.h> #include <wine/vfw.h> #include <registry.h> - -//#include "com.h" -//typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**); - - -#ifdef __FreeBSD__ -#include <sys/time.h> -#endif +#include <setup_FS.h> +#include "driver.h" +#if 1 +/* + * STORE_ALL/REST_ALL seems like an attempt to workaround problems due to + * WINAPI/no-WINAPI bustage. + * + * There should be no need for the STORE_ALL/REST_ALL hack once all + * function definitions agree with their prototypes (WINAPI-wise) and + * we make sure, that we do not call these functions without a proper + * prototype in scope. + */ +#define STORE_ALL /**/ +#define REST_ALL /**/ +#else #define STORE_ALL \ - __asm__ ( \ + __asm__( \ "push %%ebx\n\t" \ "push %%ecx\n\t" \ "push %%edx\n\t" \ @@ -31,25 +40,16 @@ "push %%edi\n\t"::) #define REST_ALL \ - __asm__ ( \ + __asm__( \ "pop %%edi\n\t" \ "pop %%esi\n\t" \ "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; @@ -119,10 +119,9 @@ void DrvClose(HDRVR hdrvr) } -extern char* def_path; //=WIN32_PATH; // path to codecs char* win32_codec_name=NULL; // must be set before calling DrvOpen() !!! -HDRVR +HDRVR VFWAPI DrvOpen(LPARAM lParam2) { ICOPEN *icopen=(ICOPEN *) lParam2; |