https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1a2b28fc644600c07fad63...
commit 1a2b28fc644600c07fad6375e3c933aaf8b0611b Author: winesync ros-dev@reactos.org AuthorDate: Fri Sep 11 17:05:18 2020 +0200 Commit: Jérôme Gardou jerome.gardou@reactos.org CommitDate: Wed Sep 16 10:35:45 2020 +0200
[WINESYNC] dbghelp: Move get_dos_file_name to path.c.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id d38682397997c56359f6d161467a56ffe5bfa9fa by Jacek Caban jacek@codeweavers.com --- dll/win32/dbghelp/dbghelp_private.h | 1 + dll/win32/dbghelp/elf_module.c | 23 ----------------------- dll/win32/dbghelp/path.c | 26 ++++++++++++++++++++++++++ sdk/tools/winesync/dbghelp.cfg | 2 +- 4 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h index 3288167ae0a..aecde06ac62 100644 --- a/dll/win32/dbghelp/dbghelp_private.h +++ b/dll/win32/dbghelp/dbghelp_private.h @@ -699,6 +699,7 @@ extern BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR ip, extern BOOL path_find_symbol_file(const struct process* pcs, const struct module* module, PCSTR full_path, const GUID* guid, DWORD dw1, DWORD dw2, WCHAR *buffer, BOOL* is_unmatched) DECLSPEC_HIDDEN; +extern WCHAR *get_dos_file_name(const WCHAR *filename) DECLSPEC_HIDDEN;
/* pe_module.c */ extern BOOL pe_load_nt_header(HANDLE hProc, DWORD64 base, IMAGE_NT_HEADERS* nth) DECLSPEC_HIDDEN; diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index c89292a644e..75f046105c7 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -396,29 +396,6 @@ static BOOL elf_map_shdr(struct elf_map_file_data* emfd, struct image_file_map* return TRUE; }
-static WCHAR *get_dos_file_name(const WCHAR *filename) -{ - WCHAR *dos_path; - size_t len; - - if (*filename == '/') - { - char *unix_path; - len = WideCharToMultiByte(CP_UNIXCP, 0, filename, -1, NULL, 0, NULL, NULL); - unix_path = heap_alloc(len * sizeof(WCHAR)); - WideCharToMultiByte(CP_UNIXCP, 0, filename, -1, unix_path, len, NULL, NULL); - dos_path = wine_get_dos_file_name(unix_path); - heap_free(unix_path); - } - else - { - len = lstrlenW(filename); - dos_path = heap_alloc((len + 1) * sizeof(WCHAR)); - memcpy(dos_path, filename, (len + 1) * sizeof(WCHAR)); - } - return dos_path; -} - /****************************************************************** * elf_map_file * diff --git a/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c index 014c79c4790..21ff3ac5dfc 100644 --- a/dll/win32/dbghelp/path.c +++ b/dll/win32/dbghelp/path.c @@ -27,6 +27,7 @@ #include "winnls.h" #include "winternl.h" #include "wine/debug.h" +#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
@@ -696,3 +697,28 @@ BOOL path_find_symbol_file(const struct process* pcs, const struct module* modul } return FALSE; } + +#ifndef __REACTOS__ +WCHAR *get_dos_file_name(const WCHAR *filename) +{ + WCHAR *dos_path; + size_t len; + + if (*filename == '/') + { + char *unix_path; + len = WideCharToMultiByte(CP_UNIXCP, 0, filename, -1, NULL, 0, NULL, NULL); + unix_path = heap_alloc(len * sizeof(WCHAR)); + WideCharToMultiByte(CP_UNIXCP, 0, filename, -1, unix_path, len, NULL, NULL); + dos_path = wine_get_dos_file_name(unix_path); + heap_free(unix_path); + } + else + { + len = lstrlenW(filename); + dos_path = heap_alloc((len + 1) * sizeof(WCHAR)); + memcpy(dos_path, filename, (len + 1) * sizeof(WCHAR)); + } + return dos_path; +} +#endif diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index db527a2f157..edd9c2dc5d4 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: 171c6fadab8eb444968c1b3a4b364e2e978a639a + wine: d38682397997c56359f6d161467a56ffe5bfa9fa