Add dos .COM support to PROCESS_InitWine()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patch from Alexandre.

ChangeLog entry:
*scheduler/process.c:
Add dos .COM support to PROCESS_InitWine().


Index: scheduler/process.c
===================================================================
RCS file: /home/wine/wine/scheduler/process.c,v
retrieving revision 1.189
diff -u -r1.189 process.c
--- scheduler/process.c	13 Jun 2002 21:57:39 -0000	1.189
+++ scheduler/process.c	21 Jul 2002 19:09:25 -0000
@@ -541,7 +541,7 @@
  */
 void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name, HANDLE *win16_exe_file )
 {
-    char error[100];
+    char error[100], *p;
     DWORD stack_size = 0;
 
     /* Initialize everything */
@@ -579,9 +579,6 @@
 
     switch( MODULE_GetBinaryType( main_exe_file ))
     {
-    case BINARY_UNKNOWN:
-        MESSAGE( "%s: cannot determine executable type for '%s'\n", argv0, main_exe_name );
-        ExitProcess(1);
     case BINARY_PE_EXE:
         TRACE( "starting Win32 binary %s\n", debugstr_a(main_exe_name) );
         if ((current_process.module = PE_LoadImage( main_exe_file, main_exe_name, 0 ))) goto found;
@@ -590,6 +587,13 @@
     case BINARY_PE_DLL:
         MESSAGE( "%s: '%s' is a DLL, not an executable\n", argv0, main_exe_name );
         ExitProcess(1);
+    case BINARY_UNKNOWN:
+        if (!(p = strrchr( main_exe_name, '.' )) || FILE_strcasecmp( p, ".com" ))
+        {
+            MESSAGE( "%s: cannot determine executable type for '%s'\n", argv0, main_exe_name );
+            ExitProcess(1);
+        }
+        /* fall through */
     case BINARY_WIN16:
     case BINARY_DOS:
         TRACE( "starting Win16/DOS binary %s\n", debugstr_a(main_exe_name) );

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux