Change to fix Mac OS X

Michael Casadevall sonicmctails at gmail.com
Thu Dec 7 11:04:31 CST 2006


I've been tracking Wine for sometime in git, and attempting to build  
it on Mac OS X just to have repetitive failure. I finally had some  
time to look at the cause, and figured out that it was failing due to  
a prototype mismatch in dlls/dbghelp/dbghelp_private.h and dlls/ 
dbghelp/elf_loader.c. The problem is that the function  
elf_load_module uses a DWORD in elf_loader.c and an unsigned load in  
the dbghelp_private.h. I changed the header to a DWORD which fixed  
the compile right up and allowed it to successfully build Wine, but  
after talking to vitamin, this change might cause issues with Wine on  
64-bit systems. Since I only own 32-bit, and know little about  
differences when programming 64-bit systems, I thought I should ask  
before I submit the patch to wine-patches.

The full prototype and arguments are:
dbghelp_private.h:
extern struct module* elf_load_module(struct process* pcs, const  
char* name, unsigned long)

elf_loader.c:
struct module*  elf_load_module(struct process* pcs, const char*  
name, DWORD addr)

For good measure, I've also attached the patch to this email.
Regard,
Michael
-------------- next part --------------
From 862fad6afe2c984dc103ce1c4faece5953d537d5 Mon Sep 17 00:00:00 2001
From: Michael Casadevall <mcasadevall at cerberus.lan>
Date: Thu, 7 Dec 2006 11:56:30 -0500
Subject: [PATCH] Fixed OSX build

---
 dlls/dbghelp/dbghelp_private.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index 19864db..077a6d1 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -414,7 +414,7 @@ extern BOOL         elf_fetch_file_info(
 struct elf_file_map;
 extern BOOL         elf_load_debug_info(struct module* module, struct elf_file_map* fmap);
 extern struct module*
-                    elf_load_module(struct process* pcs, const char* name, unsigned long);
+                    elf_load_module(struct process* pcs, const char* name, DWORD);
 extern BOOL         elf_read_wine_loader_dbg_info(struct process* pcs);
 extern BOOL         elf_synchronize_module_list(struct process* pcs);
 struct elf_thunk_area;
-- 
1.4.4.1



More information about the wine-devel mailing list