CreateProcessA/W patch

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

 



Btw Alexandre this was causing the problems with wineconsole not starting that 
I was having.

ChangeLog entry:
*scheduler/process.c:
Chris Morgan <cmorgan@alum.wpi.edu>
Correctly load .COM executables in CreateProcessA/W().

Chris

Index: scheduler/process.c
===================================================================
RCS file: /home/wine/wine/scheduler/process.c,v
retrieving revision 1.190
diff -u -r1.190 process.c
--- scheduler/process.c	22 Jul 2002 20:35:11 -0000	1.190
+++ scheduler/process.c	23 Jul 2002 02:39:27 -0000
@@ -1104,6 +1104,7 @@
     DOS_FULL_NAME full_dir;
     char name[MAX_PATH];
     LPSTR tidy_cmdline;
+    char *p;
 
     /* Process the AppName and/or CmdLine to get module name and path */
 
@@ -1182,6 +1183,14 @@
 
     switch( MODULE_GetBinaryType( hFile ))
     {
+    case BINARY_UNKNOWN:
+        /* check for .com extension */
+        if (!(p = strrchr( name, '.' )) || FILE_strcasecmp( p, ".com" ))
+        {
+	    /* no idea what it is, try as a unix executable */
+	    goto BINARY_UNIX_EXE;
+        }
+        /* fall through */
     case BINARY_PE_EXE:
     case BINARY_WIN16:
     case BINARY_DOS:
@@ -1202,11 +1211,9 @@
         retv = create_process( hFile, name, tidy_cmdline, env, process_attr, thread_attr,
                                inherit, flags, startup_info, info, unixdir );
         break;
+BINARY_UNIX_EXE:
     case BINARY_UNIX_EXE:
-    case BINARY_UNKNOWN:
         {
-            /* unknown file, try as unix executable */
-
             DOS_FULL_NAME full_name;
             const char *unixfilename = name;
 

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

  Powered by Linux