https://git.reactos.org/?p=reactos.git;a=commitdiff;h=739259ac2f74da4a8c5b91774b602ad1619d1478

commit 739259ac2f74da4a8c5b91774b602ad1619d1478
Author:     winesync <[email protected]>
AuthorDate: Fri Sep 11 18:59:48 2020 +0200
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Wed Sep 16 10:35:54 2020 +0200

    [WINESYNC] dbghelp: Use local macho load command declaration.
    
    Signed-off-by: Jacek Caban <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id c695e7e99e0a06b6039d46f98fea35c363aa6cbe by Jacek Caban 
<[email protected]>
---
 dll/win32/dbghelp/image_private.h | 19 ++++++++++++++++---
 dll/win32/dbghelp/macho_module.c  | 22 +++++++++++-----------
 sdk/tools/winesync/dbghelp.cfg    |  2 +-
 3 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/dll/win32/dbghelp/image_private.h 
b/dll/win32/dbghelp/image_private.h
index 6406c2e43e3..947ee4aee67 100644
--- a/dll/win32/dbghelp/image_private.h
+++ b/dll/win32/dbghelp/image_private.h
@@ -65,6 +65,19 @@ struct elf_section_header
     UINT64  sh_entsize;    /* Entry size if section holds table */
 };
 
+struct macho_load_command
+{
+    UINT32  cmd;           /* type of load command */
+    UINT32  cmdsize;       /* total size of command in bytes */
+};
+
+struct macho_uuid_command
+{
+    UINT32  cmd;           /* LC_UUID */
+    UINT32  cmdsize;
+    UINT8   uuid[16];
+};
+
 /* structure holding information while handling an ELF image
  * allows one by one section mapping for memory savings
  */
@@ -100,14 +113,14 @@ struct image_file_map
             size_t                      commands_size;
             size_t                      commands_count;
 
-#ifdef HAVE_MACH_O_LOADER_H
-            const struct load_command*  load_commands;
-            const struct uuid_command*  uuid;
+            const struct macho_load_command*    load_commands;
+            const struct macho_uuid_command*    uuid;
 
             /* The offset in the file which is this architecture.  mach_header 
was
              * read from arch_offset. */
             unsigned                    arch_offset;
 
+#ifdef HAVE_MACH_O_LOADER_H
             int                         num_sections;
             struct
             {
diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c
index 5d3f8615e87..ac4e8cbb7e5 100644
--- a/dll/win32/dbghelp/macho_module.c
+++ b/dll/win32/dbghelp/macho_module.c
@@ -443,11 +443,11 @@ static const struct image_file_map_ops macho_file_map_ops 
=
  *
  * Maps the load commands from a Mach-O file into memory
  */
-static const struct load_command* macho_map_load_commands(struct 
macho_file_map* fmap)
+static const struct macho_load_command* macho_map_load_commands(struct 
macho_file_map* fmap)
 {
     if (fmap->load_commands == IMAGE_NO_MAP)
     {
-        fmap->load_commands = (const struct load_command*) macho_map_range(
+        fmap->load_commands = (const struct macho_load_command*) 
macho_map_range(
                 fmap, fmap->header_size, fmap->commands_size, NULL);
         TRACE("Mapped load commands: %p\n", fmap->load_commands);
     }
@@ -475,9 +475,9 @@ static void macho_unmap_load_commands(struct 
macho_file_map* fmap)
  *
  * Advance to the next load command
  */
-static const struct load_command* macho_next_load_command(const struct 
load_command* lc)
+static const struct macho_load_command* macho_next_load_command(const struct 
macho_load_command* lc)
 {
-    return (const struct load_command*)((const char*)lc + lc->cmdsize);
+    return (const struct macho_load_command*)((const char*)lc + lc->cmdsize);
 }
 
 /******************************************************************
@@ -492,11 +492,11 @@ static const struct load_command* 
macho_next_load_command(const struct load_comm
  * processed.
  */
 static int macho_enum_load_commands(struct image_file_map *ifm, unsigned cmd,
-                                    int (*cb)(struct image_file_map*, const 
struct load_command*, void*),
+                                    int (*cb)(struct image_file_map*, const 
struct macho_load_command*, void*),
                                     void* user)
 {
     struct macho_file_map* fmap = &ifm->u.macho;
-    const struct load_command* lc;
+    const struct macho_load_command* lc;
     int i;
     int count = 0;
 
@@ -528,7 +528,7 @@ static int macho_enum_load_commands(struct image_file_map 
*ifm, unsigned cmd,
  * significant sections in a Mach-O file.  All commands are
  * expected to be of LC_SEGMENT[_64] type.
  */
-static int macho_count_sections(struct image_file_map* ifm, const struct 
load_command* lc, void* user)
+static int macho_count_sections(struct image_file_map* ifm, const struct 
macho_load_command* lc, void* user)
 {
     char segname[16];
     uint32_t nsects;
@@ -560,7 +560,7 @@ static int macho_count_sections(struct image_file_map* ifm, 
const struct load_co
  * range covered by the segments of a Mach-O file and builds the
  * section map.  All commands are expected to be of LC_SEGMENT[_64] type.
  */
-static int macho_load_section_info(struct image_file_map* ifm, const struct 
load_command* lc, void* user)
+static int macho_load_section_info(struct image_file_map* ifm, const struct 
macho_load_command* lc, void* user)
 {
     struct macho_file_map*          fmap = &ifm->u.macho;
     struct section_info*            info = user;
@@ -652,9 +652,9 @@ static int macho_load_section_info(struct image_file_map* 
ifm, const struct load
  * Callback for macho_enum_load_commands.  Records the UUID load
  * command of a Mach-O file.
  */
-static int find_uuid(struct image_file_map* ifm, const struct load_command* 
lc, void* user)
+static int find_uuid(struct image_file_map* ifm, const struct 
macho_load_command* lc, void* user)
 {
-    ifm->u.macho.uuid = (const struct uuid_command*)lc;
+    ifm->u.macho.uuid = (const struct macho_uuid_command*)lc;
     return 1;
 }
 
@@ -927,7 +927,7 @@ static void macho_stabs_def_cb(struct module* module, 
ULONG_PTR load_offset,
  * load commands from the Mach-O file.
  */
 static int macho_parse_symtab(struct image_file_map* ifm,
-                              const struct load_command* lc, void* user)
+                              const struct macho_load_command* lc, void* user)
 {
     struct macho_file_map* fmap = &ifm->u.macho;
     const struct symtab_command*    sc = (const struct symtab_command*)lc;
diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg
index 504be41c2ab..b5400813eb8 100644
--- a/sdk/tools/winesync/dbghelp.cfg
+++ b/sdk/tools/winesync/dbghelp.cfg
@@ -4,4 +4,4 @@ files:
   include/dbghelp.h: sdk/include/psdk/dbghelp.h
   include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
 tags:
-  wine: 7254579417f337063734933975b25d21da4d31f3
+  wine: c695e7e99e0a06b6039d46f98fea35c363aa6cbe

Reply via email to