From 4f3776f018ba2b7d07180da5500ba7dd55567637 Mon Sep 17 00:00:00 2001 From: arpi Date: Thu, 4 Oct 2001 02:21:47 +0000 Subject: sync with avifile git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2070 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/pe_image.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'loader/pe_image.c') diff --git a/loader/pe_image.c b/loader/pe_image.c index 5d383c3d29..498e4eeeee 100644 --- a/loader/pe_image.c +++ b/loader/pe_image.c @@ -33,7 +33,8 @@ * newer pe binaries produced by MSVC 5 and later, since they are also aligned * to 4096 byte boundaries on disk. */ -#include +#include "config.h" +//#include #include #include @@ -44,9 +45,6 @@ #include #include #include -#ifdef HAVE_ALLOCA_H -#include -#endif #ifdef HAVE_SYS_MMAN_H #include #endif @@ -57,8 +55,7 @@ #include #include #include -#include - +#include "ext.h" #include "win32.h" #define RVA(x) ((void *)((char *)load_addr+(unsigned int)(x))) @@ -179,7 +176,7 @@ FARPROC PE_FindExportedFunction( ename = RVA(name[i]); if (!strcmp( ename, funcName )) { - ERR( "%s.%s required a linear search\n", wm->modname, funcName ); + ERR( "%s.%s required a linear search\n", wm->modname, funcName ); ordinal = ordinals[i]; goto found; } @@ -565,6 +562,7 @@ HMODULE PE_LoadImage( int handle, LPCSTR filename, WORD *version ) } } + load_addr = nt->OptionalHeader.ImageBase; vma_size = calc_vma_size( hModule ); @@ -884,6 +882,7 @@ void PE_UnloadLibrary(WINE_MODREF *wm) * due to the PROCESS_Create stuff. */ + /* * This is a dirty hack. * The win32 DLLs contain an alloca routine, that first probes the soon @@ -898,11 +897,12 @@ void PE_UnloadLibrary(WINE_MODREF *wm) */ static void extend_stack_for_dll_alloca(void) { +#ifndef __FreeBSD__ void* mem=alloca(0x20000); *(int*)mem=0x1234; +#endif } - /* 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 -- cgit v1.2.3