Index: loader/win32.c =================================================================== --- loader/win32.c.orig 2007-02-07 22:58:12.000000000 -0800 +++ loader/win32.c 2007-02-07 22:58:18.000000000 -0800 @@ -3603,7 +3603,7 @@ dbgprintf("CreateFileA(0x%x='%s', %d, %d, 0x%x, %d, %d, 0x%x)\n", cs1, cs1, i1, i2, p1, i3, i4, i5); if((!cs1) || (strlen(cs1)<2))return -1; - + if(strstr(cs1, "\\\\.\\")) return -1; //Hack for PECompact2 #ifdef QTX if(strstr(cs1, "QuickTime.qts")) { Index: loader/pe_image.c =================================================================== --- loader/pe_image.c.orig 2007-02-07 22:44:47.000000000 -0800 +++ loader/pe_image.c 2007-02-07 22:58:18.000000000 -0800 @@ -910,6 +910,22 @@ #endif } +#include +static void wine_sighandler(int x) +{ + __asm__ ("movl 68(%esp), %eax\n\t" + "pushl %eax\n\t" + "subl $12, %esp\n\t" + "movl %esp, %eax\n\t" + "pushl %eax\n\t" + "pushl %eax\n\t" + "movl %fs:0x0, %eax\n\t" + "movl 4(%eax),%eax\n\t" + "call *%eax\n\t" + "movl %ebp, %esp\n\t"); + return; +} + /* Called if the library is loaded or freed. * NOTE: if a thread attaches a DLL, the current thread will only do * DLL_PROCESS_ATTACH. Only new created threads do DLL_THREAD_ATTACH @@ -951,7 +967,9 @@ } TRACE("for %s\n", wm->filename); extend_stack_for_dll_alloca(); + void *oldsig = signal(SIGSEGV, wine_sighandler); retv = entry( wm->module, type, lpReserved ); + signal(SIGSEGV, oldsig); } return retv;