diff loader/driver.c @ 1307:d8c1b0b38edc

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.
author jkeil
date Thu, 12 Jul 2001 15:27:48 +0000
parents 1f7c824033fb
children 3189c317dfc1
line wrap: on
line diff
--- a/loader/driver.c	Thu Jul 12 15:23:26 2001 +0000
+++ b/loader/driver.c	Thu Jul 12 15:27:48 2001 +0000
@@ -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**);
+#include <setup_FS.h>
+#include "driver.h"
 
 
-#ifdef __FreeBSD__
-#include <sys/time.h>
-#endif
-
-
+#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 @@
 }
 
 
-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;