Rebase against c7f323107b3b956d206d8d0ee28851d60f19841c

This commit is contained in:
Alistair Leslie-Hughes 2019-03-26 12:56:49 +11:00
parent d963a250c9
commit 0d4d90ee80
7 changed files with 77 additions and 378 deletions

View File

@ -1,131 +0,0 @@
From 9156b97f5aab56ae2ab8b981b625bd46e1ef2056 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 11 Aug 2015 04:35:45 +0200
Subject: imagehlp: Implement ImageLoad and cleanup ImageUnload.
---
dlls/imagehlp/access.c | 85 ++++++++++++++++++++++++++++----------------------
1 file changed, 48 insertions(+), 37 deletions(-)
diff --git a/dlls/imagehlp/access.c b/dlls/imagehlp/access.c
index 6a33c0c..897f2d5 100644
--- a/dlls/imagehlp/access.c
+++ b/dlls/imagehlp/access.c
@@ -33,8 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
/***********************************************************************
* Data
*/
-
-static PLOADED_IMAGE IMAGEHLP_pFirstLoadedImage=NULL;
+LIST_ENTRY image_list = { &image_list, &image_list };
DECLSPEC_HIDDEN extern HANDLE IMAGEHLP_hHeap;
@@ -69,57 +68,69 @@ DWORD WINAPI GetImageUnusedHeaderBytes(
/***********************************************************************
* ImageLoad (IMAGEHLP.@)
*/
-PLOADED_IMAGE WINAPI ImageLoad(PCSTR DllName, PCSTR DllPath)
+PLOADED_IMAGE WINAPI ImageLoad(PCSTR dll_name, PCSTR dll_path)
{
- PLOADED_IMAGE pLoadedImage;
-
- FIXME("(%s, %s): stub\n", DllName, DllPath);
-
- pLoadedImage = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE));
- if (pLoadedImage)
- pLoadedImage->FileHeader = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(IMAGE_NT_HEADERS));
-
- return pLoadedImage;
+ LOADED_IMAGE *image;
+
+ TRACE("(%s, %s)\n", dll_name, dll_path);
+
+ image = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(*image));
+ if (!image) return NULL;
+
+ if (!MapAndLoad(dll_name, dll_path, image, TRUE, TRUE))
+ {
+ HeapFree(IMAGEHLP_hHeap, 0, image);
+ return NULL;
+ }
+
+ image->Links.Flink = image_list.Flink;
+ image->Links.Blink = &image_list;
+ image_list.Flink->Blink = &image->Links;
+ image_list.Flink = &image->Links;
+
+ return image;
}
/***********************************************************************
* ImageUnload (IMAGEHLP.@)
*/
-BOOL WINAPI ImageUnload(PLOADED_IMAGE pLoadedImage)
+BOOL WINAPI ImageUnload(PLOADED_IMAGE loaded_image)
{
- LIST_ENTRY *pCurrent, *pFind;
+ LIST_ENTRY *entry, *mark;
+ PLOADED_IMAGE image;
+
+ FIXME("(%p)\n", loaded_image);
- TRACE("(%p)\n", pLoadedImage);
-
- if(!IMAGEHLP_pFirstLoadedImage || !pLoadedImage)
+ if (!loaded_image)
{
- /* No image loaded or null pointer */
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
+ /* No image loaded or null pointer */
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
}
- pFind=&pLoadedImage->Links;
- pCurrent=&IMAGEHLP_pFirstLoadedImage->Links;
- while((pCurrent != pFind) &&
- (pCurrent != NULL))
- pCurrent = pCurrent->Flink;
- if(!pCurrent)
+ /* FIXME: do we really need to check this? */
+ mark = &image_list;
+ for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{
- /* Not found */
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
+ image = CONTAINING_RECORD(entry, LOADED_IMAGE, Links);
+ if (image == loaded_image)
+ break;
}
- if(pCurrent->Blink)
- pCurrent->Blink->Flink = pCurrent->Flink;
- else
- IMAGEHLP_pFirstLoadedImage = pCurrent->Flink?CONTAINING_RECORD(
- pCurrent->Flink, LOADED_IMAGE, Links):NULL;
+ if (entry == mark)
+ {
+ /* Not found */
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
- if(pCurrent->Flink)
- pCurrent->Flink->Blink = pCurrent->Blink;
+ entry->Blink->Flink = entry->Flink;
+ entry->Flink->Blink = entry->Blink;
- return FALSE;
+ UnMapAndLoad(loaded_image);
+ HeapFree(IMAGEHLP_hHeap, 0, loaded_image);
+
+ return TRUE;
}
/***********************************************************************
--
2.5.0

View File

@ -1,138 +0,0 @@
From c7cb245f53d0a512be8b80fc4339ca7293186a08 Mon Sep 17 00:00:00 2001
From: Mark Jansen <learn0more@gmail.com>
Date: Thu, 14 May 2015 00:53:20 +0200
Subject: imagehlp/tests: Add tests for ImageLoad, ImageUnload,
GetImageUnusedHeaderBytes.
---
dlls/imagehlp/tests/image.c | 97 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+)
diff --git a/dlls/imagehlp/tests/image.c b/dlls/imagehlp/tests/image.c
index 3416c10..7a6019b 100644
--- a/dlls/imagehlp/tests/image.c
+++ b/dlls/imagehlp/tests/image.c
@@ -33,6 +33,10 @@ static HMODULE hImageHlp;
static BOOL (WINAPI *pImageGetDigestStream)(HANDLE, DWORD, DIGEST_FUNCTION, DIGEST_HANDLE);
static BOOL (WINAPI *pBindImageEx)(DWORD Flags, const char *ImageName, const char *DllPath,
const char *SymbolPath, PIMAGEHLP_STATUS_ROUTINE StatusRoutine);
+static DWORD (WINAPI* pGetImageUnusedHeaderBytes)(PLOADED_IMAGE, LPDWORD);
+static PLOADED_IMAGE (WINAPI* pImageLoad)(PCSTR, PCSTR);
+static BOOL (WINAPI* pImageUnload)(PLOADED_IMAGE);
+
/* minimal PE file image */
#define VA_START 0x400000
@@ -424,6 +428,95 @@ static void test_bind_image_ex(void)
DeleteFileA(temp_file);
}
+static void test_image_load(void)
+{
+ char temp_file[MAX_PATH];
+ PLOADED_IMAGE img;
+ DWORD ret, count;
+ HANDLE file;
+
+ if (!pImageLoad || !pImageUnload)
+ {
+ win_skip("ImageLoad or ImageUnload function is not available\n");
+ return;
+ }
+ if (!pGetImageUnusedHeaderBytes)
+ {
+ win_skip("GetImageUnusedHeaderBytes function is not available\n");
+ return;
+ }
+
+ file = create_temp_file(temp_file);
+ if (file == INVALID_HANDLE_VALUE)
+ {
+ skip("couldn't create temp file\n");
+ return;
+ }
+
+ WriteFile(file, &bin, sizeof(bin), &count, NULL);
+ CloseHandle(file);
+
+ img = pImageLoad(temp_file, NULL);
+ ok(img != NULL, "ImageLoad unexpectedly failed\n");
+
+ if (img)
+ {
+ ok(!strcmp(img->ModuleName, temp_file),
+ "unexpected ModuleName, got %s instead of %s\n", img->ModuleName, temp_file);
+ ok(img->MappedAddress != NULL, "MappedAddress != NULL\n");
+ if (img->MappedAddress)
+ {
+ ok(!memcmp(img->MappedAddress, &bin.dos_header, sizeof(bin.dos_header)),
+ "MappedAddress doesn't point to IMAGE_DOS_HEADER\n");
+ }
+ ok(img->FileHeader != NULL, "FileHeader != NULL\n");
+ if (img->FileHeader)
+ {
+ ok(!memcmp(img->FileHeader, &bin.nt_headers, sizeof(bin.nt_headers)),
+ "FileHeader doesn't point to IMAGE_NT_HEADERS32\n");
+ }
+ ok(img->NumberOfSections == 3,
+ "unexpected NumberOfSections, got %d instead of 3\n", img->NumberOfSections);
+ if (img->NumberOfSections >= 3)
+ {
+ ok(!strcmp((const char *)img->Sections[0].Name, ".text"),
+ "unexpected name for section 0, expected .text, got %s\n",
+ (const char *)img->Sections[0].Name);
+ ok(!strcmp((const char *)img->Sections[1].Name, ".bss"),
+ "unexpected name for section 1, expected .bss, got %s\n",
+ (const char *)img->Sections[1].Name);
+ ok(!strcmp((const char *)img->Sections[2].Name, ".idata"),
+ "unexpected name for section 2, expected .idata, got %s\n",
+ (const char *)img->Sections[2].Name);
+ }
+ ok(img->Characteristics == 0x102,
+ "unexpected Characteristics, got 0x%x instead of 0x102\n", img->Characteristics);
+ ok(img->fSystemImage == 0,
+ "unexpected fSystemImage, got %d instead of 0\n", img->fSystemImage);
+ ok(img->fDOSImage == 0,
+ "unexpected fDOSImage, got %d instead of 0\n", img->fDOSImage);
+ todo_wine
+ ok(img->fReadOnly == 1 || broken(!img->fReadOnly) /* <= WinXP */,
+ "unexpected fReadOnly, got %d instead of 1\n", img->fReadOnly);
+ todo_wine
+ ok(img->Version == 1 || broken(!img->Version) /* <= WinXP */,
+ "unexpected Version, got %d instead of 1\n", img->Version);
+ ok(img->SizeOfImage == 0x600,
+ "unexpected SizeOfImage, got 0x%x instead of 0x600\n", img->SizeOfImage);
+
+ count = 0xdeadbeef;
+ ret = pGetImageUnusedHeaderBytes(img, &count);
+ todo_wine
+ ok(ret == 448, "GetImageUnusedHeaderBytes returned %u instead of 448\n", ret);
+ todo_wine
+ ok(count == 64, "unexpected size for unused header bytes, got %u instead of 64\n", count);
+
+ pImageUnload(img);
+ }
+
+ DeleteFileA(temp_file);
+}
+
START_TEST(image)
{
hImageHlp = LoadLibraryA("imagehlp.dll");
@@ -436,9 +529,13 @@ START_TEST(image)
pImageGetDigestStream = (void *) GetProcAddress(hImageHlp, "ImageGetDigestStream");
pBindImageEx = (void *) GetProcAddress(hImageHlp, "BindImageEx");
+ pGetImageUnusedHeaderBytes = (void *) GetProcAddress(hImageHlp, "GetImageUnusedHeaderBytes");
+ pImageLoad = (void *) GetProcAddress(hImageHlp, "ImageLoad");
+ pImageUnload = (void *) GetProcAddress(hImageHlp, "ImageUnload");
test_get_digest_stream();
test_bind_image_ex();
+ test_image_load();
FreeLibrary(hImageHlp);
}
--
2.8.0

View File

@ -1 +0,0 @@
Depends: imagehlp-Cleanup

View File

@ -1,15 +1,15 @@
From 0e78ff26dc69402d31b691f0fec956d516bcd1de Mon Sep 17 00:00:00 2001
From 374ad574cfb7f7cdfcb8534effa83efa02d59bb0 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dtimoshkov@codeweavers.com>
Date: Mon, 28 Jul 2003 07:39:25 -0500
Subject: [PATCH] libs: Fix most problems with CompareString.
---
dlls/kernel32/tests/locale.c | 9 +++---
libs/wine/collation.c | 60 ++++++++++++++++++------------------
dlls/kernel32/tests/locale.c | 9 +++----
libs/port/collation.c | 60 ++++++++++++++++++++++----------------------
2 files changed, 34 insertions(+), 35 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index 2627fc5d..c90223e6 100644
index cf781e5..bba3664 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1963,13 +1963,13 @@ static void test_CompareStringA(void)
@ -29,7 +29,7 @@ index 2627fc5d..c90223e6 100644
lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT);
@@ -6020,6 +6020,5 @@ START_TEST(locale)
@@ -6026,6 +6026,5 @@ START_TEST(locale)
test_SetThreadUILanguage();
test_NormalizeString();
test_SpecialCasing();
@ -37,11 +37,11 @@ index 2627fc5d..c90223e6 100644
- if (0) test_sorting();
+ test_sorting();
}
diff --git a/libs/wine/collation.c b/libs/wine/collation.c
index 465d7400..f354a75f 100644
--- a/libs/wine/collation.c
+++ b/libs/wine/collation.c
@@ -75,34 +75,34 @@ const unsigned int collation_table[12800] =
diff --git a/libs/port/collation.c b/libs/port/collation.c
index 2d990d8..290fa98 100644
--- a/libs/port/collation.c
+++ b/libs/port/collation.c
@@ -77,34 +77,34 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0x00000000, 0x02010111, 0x02020111, 0x02030111, 0x02040111, 0x02050111, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@ -92,7 +92,7 @@ index 465d7400..f354a75f 100644
/* 0x0100 .. 0x01ff */
0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a3d0151, 0x0a3d0111,
0x0a3d0151, 0x0a3d0111, 0x0a3d0151, 0x0a3d0111, 0x0a3d0151, 0x0a3d0111, 0x0a490151, 0x0a490111,
@@ -189,7 +189,7 @@ const unsigned int collation_table[12800] =
@@ -191,7 +191,7 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x020d0111, 0x02140111, 0x0c910121, 0x025f0111,
0x0c950131, 0x0c990121, 0x0c9b0121, 0xffffffff, 0x0ca20121, 0xffffffff, 0x0ca80121, 0x0cac0121,
0x0c9b0111, 0x0c910121, 0x0c920131, 0x0c930121, 0x0c940121, 0x0c950131, 0x0c980121, 0x0c990121,
@ -101,7 +101,7 @@ index 465d7400..f354a75f 100644
0x0ca30131, 0x0ca50131, 0xffffffff, 0x0ca60131, 0x0ca70121, 0x0ca80121, 0x0ca90131, 0x0caa0121,
0x0cab0121, 0x0cac0121, 0x0c9b0121, 0x0ca80121, 0x0c910111, 0x0c950111, 0x0c990111, 0x0c9b0111,
0x0ca80111, 0x0c910111, 0x0c920111, 0x0c930111, 0x0c940111, 0x0c950111, 0x0c980111, 0x0c990111,
@@ -929,12 +929,12 @@ const unsigned int collation_table[12800] =
@@ -931,12 +931,12 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0xffffffff, 0xffffffff, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0xffffffff, 0x0cac0111, 0x0cac0111,
0x0ca20121, 0x0ca20121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x020d0111, 0x02180111, 0xffffffff,
/* 0x2000 .. 0x20ff */
@ -117,7 +117,7 @@ index 465d7400..f354a75f 100644
0x02ac0111, 0x02ad0111, 0x02b60111, 0x02b60121, 0x02b60121, 0x02b70111, 0x02b70121, 0x02b70121,
0x02b90111, 0x026e0111, 0x026f0111, 0x02ba0111, 0x024b0131, 0x02540111, 0x02110111, 0x02bb0111,
0x02bc0111, 0x02bd0111, 0x02be0111, 0x02b30111, 0x02a50111, 0x02860111, 0x02870111, 0xffffffff,
@@ -1292,7 +1292,7 @@ const unsigned int collation_table[12800] =
@@ -1294,7 +1294,7 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0x09a90111, 0x09aa0111, 0x09ab0111, 0x09ac0111, 0x09ad0111, 0x09ae0111, 0x09af0111, 0x09b00111,
0x09b10111, 0x09b20111, 0x09b30111, 0x09b40111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
/* 0x3000 .. 0x30ff */
@ -126,7 +126,7 @@ index 465d7400..f354a75f 100644
0x02880111, 0x02890111, 0x028a0111, 0x028b0111, 0x028c0111, 0x028d0111, 0x028e0111, 0x028f0111,
0x02900111, 0x02910111, 0x09b60111, 0x09b70111, 0x02920111, 0x02930111, 0x02940111, 0x02950111,
0x02960111, 0x02970111, 0x02980111, 0x02990111, 0x022a0111, 0x02750111, 0x02760111, 0x02770111,
@@ -1407,14 +1407,14 @@ const unsigned int collation_table[12800] =
@@ -1409,14 +1409,14 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131,
0x0a0d0131, 0x0ab901a1, 0x0a490191, 0x0a1501a1, 0x0a290181, 0x0b4b01b1, 0x0b670181, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffffff, 0xfb400151, 0xfb400151, 0xfb400151, 0xfb400151, 0xfb400151,
@ -147,7 +147,7 @@ index 465d7400..f354a75f 100644
0x0af70171, 0x0b2b01b1, 0x0a150191, 0x0a290191, 0x0a3d01a1, 0x0a3d01a1, 0x0a3d01b1, 0x0a3d01b1,
0x0a490191, 0x0a990181, 0x0ab901a1, 0x0ab901b1, 0x0ad301b1, 0x0af70181, 0x0af70181, 0x0af70171,
0x0b0301c1, 0x0b0301c1, 0x0b0301c1, 0x0b0301c1, 0x0b2b01a1, 0x0b2b01a1, 0x0b2b01a1, 0x0b670191,
@@ -1601,7 +1601,7 @@ const unsigned int collation_table[12800] =
@@ -1603,7 +1603,7 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0xffffffff, 0x02110121, 0x02110121, 0x02110121, 0x02110121, 0x021b0131, 0x021b0131, 0x021b0131,
0x022d0131, 0x02340121, 0x02550141, 0xffffffff, 0x02350131, 0x02370131, 0x024e0141, 0x024b0141,
0x02280121, 0x027a0141, 0x027b0131, 0x027e0131, 0x027f0131, 0x02920121, 0x02930121, 0x02a90131,
@ -156,7 +156,7 @@ index 465d7400..f354a75f 100644
0x02a60131, 0x09e00131, 0x02aa0131, 0x02a10131, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0x00006831, 0x00006821, 0x00006921, 0xffffffff, 0x00006a21, 0xffffffff, 0x00006b31, 0x00006b21,
0x00006c31, 0x00006c21, 0x00006d31, 0x00006d21, 0x00006e31, 0x00006e21, 0x00006f31, 0x00006f21,
@@ -1622,8 +1622,8 @@ const unsigned int collation_table[12800] =
@@ -1624,8 +1624,8 @@ const unsigned int DECLSPEC_HIDDEN collation_table[12800] =
0x0f480141, 0x0f490161, 0x0f490151, 0x0f490131, 0x0f490141, 0x0f2d0151, 0x0f2d0141, 0x0f2d0151,
0x0f2d0141, 0x0f2d0151, 0x0f2d0141, 0x0f2d0151, 0x0f2d0141, 0xffffffff, 0xffffffff, 0x00000000,
/* 0xff00 .. 0xffff */
@ -168,5 +168,5 @@ index 465d7400..f354a75f 100644
0x0a130121, 0x0a140121, 0x02370121, 0x02350121, 0x03a30121, 0x03a40121, 0x03a50121, 0x024e0121,
0x02a10121, 0x0a150161, 0x0a290151, 0x0a3d0161, 0x0a490161, 0x0a650161, 0x0a910161, 0x0a990161,
--
2.20.1
1.9.1

View File

@ -1,4 +1,4 @@
From 51bdea50efa6951b86a91236c57fb8a95737d79d Mon Sep 17 00:00:00 2001
From fbf186429a62b1bd076322ce394cc6a6322ca825 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Tue, 19 Aug 2014 22:10:49 -0600
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
@ -8,13 +8,13 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
configure.ac | 12 ++++++++++++
dlls/ntdll/file.c | 22 +++++++++++++++++++++-
include/wine/port.h | 8 ++++++++
libs/port/Makefile.in | 3 ++-
libs/port/Makefile.in | 4 +++-
libs/port/xattr.c | 39 +++++++++++++++++++++++++++++++++++++++
5 files changed, 82 insertions(+), 2 deletions(-)
5 files changed, 83 insertions(+), 2 deletions(-)
create mode 100644 libs/port/xattr.c
diff --git a/configure.ac b/configure.ac
index 4967604..375d1d3 100644
index 55d3dd0..552a94d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,6 +84,7 @@ AC_ARG_WITH(udev, AS_HELP_STRING([--without-udev],[do not use udev (plug an
@ -25,7 +25,7 @@ index 4967604..375d1d3 100644
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi])
AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]),
@@ -695,6 +696,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
@@ -703,6 +704,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
#include <sys/socket.h>
#endif])
@ -44,7 +44,7 @@ index 4967604..375d1d3 100644
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index e8775a3..ed25182 100644
index d0aaadf..27d2ce0 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -122,6 +122,22 @@ mode_t FILE_umask = 0;
@ -89,7 +89,7 @@ index e8775a3..ed25182 100644
}
diff --git a/include/wine/port.h b/include/wine/port.h
index d23e2b0..2be2afe 100644
index 2f6e9eb..b21d045 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -335,6 +335,14 @@ int usleep (unsigned int useconds);
@ -108,16 +108,17 @@ index d23e2b0..2be2afe 100644
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index 86b9022..b09dc54 100644
index ef3b23f..1c09fb5 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -102,4 +102,5 @@ C_SRCS = \
symlink.c \
@@ -106,4 +106,6 @@ C_SRCS = \
usleep.c \
utf8.c \
- wctomb.c
+ wctomb.c \
wctomb.c \
- wctype.c
+ wctype.c \
+ xattr.c
+
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
new file mode 100644
index 0000000..94b7713

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "c988910caeebfd1415ad4d036964a67078493e46"
echo "c7f323107b3b956d206d8d0ee28851d60f19841c"
}
# Show version information
@ -154,7 +154,6 @@ patch_enable_all ()
enable_httpapi_HttpCreateServerSession="$1"
enable_imagehlp_BindImageEx="$1"
enable_imagehlp_Cleanup="$1"
enable_imagehlp_ImageLoad="$1"
enable_imm32_message_on_focus="$1"
enable_include_winsock="$1"
enable_inseng_Implementation="$1"
@ -611,9 +610,6 @@ patch_enable ()
imagehlp-Cleanup)
enable_imagehlp_Cleanup="$2"
;;
imagehlp-ImageLoad)
enable_imagehlp_ImageLoad="$2"
;;
imm32-message_on_focus)
enable_imm32_message_on_focus="$2"
;;
@ -2049,13 +2045,6 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
enable_server_File_Permissions=1
fi
if test "$enable_imagehlp_ImageLoad" -eq 1; then
if test "$enable_imagehlp_Cleanup" -gt 1; then
abort "Patchset imagehlp-Cleanup disabled, but imagehlp-ImageLoad depends on that."
fi
enable_imagehlp_Cleanup=1
fi
if test "$enable_dxdiagn_GetChildContainer_Leaf_Nodes" -eq 1; then
if test "$enable_dxdiagn_Enumerate_DirectSound" -gt 1; then
abort "Patchset dxdiagn-Enumerate_DirectSound disabled, but dxdiagn-GetChildContainer_Leaf_Nodes depends on that."
@ -3650,31 +3639,14 @@ fi
# | * [#23455] Properly implement imagehlp.ImageLoad and ImageUnload
# |
# | Modified files:
# | * dlls/imagehlp/access.c, dlls/imagehlp/modify.c, dlls/imagehlp/tests/integrity.c
# | * dlls/imagehlp/modify.c, dlls/imagehlp/tests/integrity.c
# |
if test "$enable_imagehlp_Cleanup" -eq 1; then
patch_apply imagehlp-Cleanup/0001-imagehlp-Catch-invalid-memory-access-in-CheckSumMapp.patch
patch_apply imagehlp-Cleanup/0002-imagehlp-Fix-checksum-calculation-for-odd-sizes.patch
patch_apply imagehlp-Cleanup/0003-imagehlp-Implement-ImageLoad-and-cleanup-ImageUnload.patch
(
printf '%s\n' '+ { "Michael Müller", "imagehlp: Catch invalid memory access in CheckSumMappedFile and add tests.", 1 },';
printf '%s\n' '+ { "Michael Müller", "imagehlp: Fix checksum calculation for odd sizes.", 1 },';
printf '%s\n' '+ { "Michael Müller", "imagehlp: Implement ImageLoad and cleanup ImageUnload.", 1 },';
) >> "$patchlist"
fi
# Patchset imagehlp-ImageLoad
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * imagehlp-Cleanup
# |
# | Modified files:
# | * dlls/imagehlp/tests/image.c
# |
if test "$enable_imagehlp_ImageLoad" -eq 1; then
patch_apply imagehlp-ImageLoad/0001-imagehlp-tests-Add-tests-for-ImageLoad-ImageUnload-G.patch
(
printf '%s\n' '+ { "Mark Jansen", "imagehlp/tests: Add tests for ImageLoad, ImageUnload, GetImageUnusedHeaderBytes.", 1 },';
) >> "$patchlist"
fi

View File

@ -1,10 +1,10 @@
From 34d4aa2c4b456d660b0fb6be52faebd1eadc1296 Mon Sep 17 00:00:00 2001
From 6ea5706c091caa459ccb11f59ddda4f0bb8089d9 Mon Sep 17 00:00:00 2001
From: Andrew Eikum <aeikum@codeweavers.com>
Date: Thu, 31 May 2018 10:58:48 -0500
Subject: [PATCH] xaudio2: Use ffmpeg to convert WMA formats
---
configure.ac | 33 +++
configure.ac | 33 ++++
dlls/x3daudio1_0/Makefile.in | 2 +
dlls/x3daudio1_1/Makefile.in | 2 +
dlls/x3daudio1_2/Makefile.in | 2 +
@ -26,16 +26,16 @@ Subject: [PATCH] xaudio2: Use ffmpeg to convert WMA formats
dlls/xaudio2_5/Makefile.in | 3 +-
dlls/xaudio2_6/Makefile.in | 3 +-
dlls/xaudio2_7/Makefile.in | 3 +-
dlls/xaudio2_7/xaudio_dll.c | 370 +++++++++++++++++++++++++++++++-
dlls/xaudio2_7/xaudio_dll.c | 370 ++++++++++++++++++++++++++++++++++++++--
dlls/xaudio2_7/xaudio_private.h | 9 +
dlls/xaudio2_8/Makefile.in | 3 +-
dlls/xaudio2_9/Makefile.in | 3 +-
include/config.h.in | 9 +
include/mmreg.h | 5 +
28 files changed, 462 insertions(+), 20 deletions(-)
include/mmreg.h | 1 +
28 files changed, 458 insertions(+), 20 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0d580e6943e..539abd225af 100644
index 44e91bc..b2c6147 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,7 @@ AC_ARG_WITH(cups, AS_HELP_STRING([--without-cups],[do not use CUPS]))
@ -46,7 +46,7 @@ index 0d580e6943e..539abd225af 100644
AC_ARG_WITH(float-abi, AS_HELP_STRING([--with-float-abi=abi],[specify the ABI (soft|softfp|hard) for ARM platforms]))
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]))
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
@@ -1835,6 +1836,38 @@ WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_
@@ -1834,6 +1835,38 @@ WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_
[enable_l3codeca_acm])
test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_mp3dmod=${enable_mp3dmod:-no}
@ -86,7 +86,7 @@ index 0d580e6943e..539abd225af 100644
if test "$ac_cv_header_AL_al_h" = "yes"
then
diff --git a/dlls/x3daudio1_0/Makefile.in b/dlls/x3daudio1_0/Makefile.in
index 9b4ce2189cf..6c2b0058b72 100644
index 9b4ce21..6c2b005 100644
--- a/dlls/x3daudio1_0/Makefile.in
+++ b/dlls/x3daudio1_0/Makefile.in
@@ -1,5 +1,7 @@
@ -98,7 +98,7 @@ index 9b4ce2189cf..6c2b0058b72 100644
C_SRCS = \
diff --git a/dlls/x3daudio1_1/Makefile.in b/dlls/x3daudio1_1/Makefile.in
index d866dc3ddb9..e268e3c5edc 100644
index d866dc3..e268e3c 100644
--- a/dlls/x3daudio1_1/Makefile.in
+++ b/dlls/x3daudio1_1/Makefile.in
@@ -1,5 +1,7 @@
@ -110,7 +110,7 @@ index d866dc3ddb9..e268e3c5edc 100644
C_SRCS = \
diff --git a/dlls/x3daudio1_2/Makefile.in b/dlls/x3daudio1_2/Makefile.in
index d5de11b2585..75841230511 100644
index d5de11b..7584123 100644
--- a/dlls/x3daudio1_2/Makefile.in
+++ b/dlls/x3daudio1_2/Makefile.in
@@ -1,5 +1,7 @@
@ -122,7 +122,7 @@ index d5de11b2585..75841230511 100644
C_SRCS = \
diff --git a/dlls/x3daudio1_3/Makefile.in b/dlls/x3daudio1_3/Makefile.in
index cfd2c6c6c69..084336d4645 100644
index cfd2c6c..084336d 100644
--- a/dlls/x3daudio1_3/Makefile.in
+++ b/dlls/x3daudio1_3/Makefile.in
@@ -1,5 +1,7 @@
@ -134,7 +134,7 @@ index cfd2c6c6c69..084336d4645 100644
C_SRCS = \
diff --git a/dlls/x3daudio1_4/Makefile.in b/dlls/x3daudio1_4/Makefile.in
index bd0eac7fc6c..691a71ad210 100644
index bd0eac7..691a71a 100644
--- a/dlls/x3daudio1_4/Makefile.in
+++ b/dlls/x3daudio1_4/Makefile.in
@@ -1,5 +1,7 @@
@ -146,7 +146,7 @@ index bd0eac7fc6c..691a71ad210 100644
C_SRCS = \
diff --git a/dlls/x3daudio1_5/Makefile.in b/dlls/x3daudio1_5/Makefile.in
index dac67aef76d..cee7b4b28e5 100644
index dac67ae..cee7b4b 100644
--- a/dlls/x3daudio1_5/Makefile.in
+++ b/dlls/x3daudio1_5/Makefile.in
@@ -1,5 +1,7 @@
@ -158,7 +158,7 @@ index dac67aef76d..cee7b4b28e5 100644
C_SRCS = \
diff --git a/dlls/x3daudio1_6/Makefile.in b/dlls/x3daudio1_6/Makefile.in
index 177fb8d34d8..23876bd8a47 100644
index 177fb8d..23876bd 100644
--- a/dlls/x3daudio1_6/Makefile.in
+++ b/dlls/x3daudio1_6/Makefile.in
@@ -1,5 +1,7 @@
@ -170,7 +170,7 @@ index 177fb8d34d8..23876bd8a47 100644
C_SRCS = \
diff --git a/dlls/x3daudio1_7/Makefile.in b/dlls/x3daudio1_7/Makefile.in
index 019588dce0a..448a5486792 100644
index 019588d..448a548 100644
--- a/dlls/x3daudio1_7/Makefile.in
+++ b/dlls/x3daudio1_7/Makefile.in
@@ -1,5 +1,7 @@
@ -182,7 +182,7 @@ index 019588dce0a..448a5486792 100644
C_SRCS = \
diff --git a/dlls/xapofx1_1/Makefile.in b/dlls/xapofx1_1/Makefile.in
index f69ff86bd9f..e43cfcf0a71 100644
index f69ff86..e43cfcf 100644
--- a/dlls/xapofx1_1/Makefile.in
+++ b/dlls/xapofx1_1/Makefile.in
@@ -1,6 +1,8 @@
@ -195,7 +195,7 @@ index f69ff86bd9f..e43cfcf0a71 100644
C_SRCS = \
diff --git a/dlls/xapofx1_2/Makefile.in b/dlls/xapofx1_2/Makefile.in
index d56a2be4bbe..bf4df8b091a 100644
index d56a2be..bf4df8b 100644
--- a/dlls/xapofx1_2/Makefile.in
+++ b/dlls/xapofx1_2/Makefile.in
@@ -1,6 +1,8 @@
@ -208,7 +208,7 @@ index d56a2be4bbe..bf4df8b091a 100644
C_SRCS = \
diff --git a/dlls/xapofx1_3/Makefile.in b/dlls/xapofx1_3/Makefile.in
index 1139520b73e..4a3056d8d6c 100644
index 1139520..4a3056d 100644
--- a/dlls/xapofx1_3/Makefile.in
+++ b/dlls/xapofx1_3/Makefile.in
@@ -1,6 +1,8 @@
@ -221,7 +221,7 @@ index 1139520b73e..4a3056d8d6c 100644
C_SRCS = \
diff --git a/dlls/xapofx1_4/Makefile.in b/dlls/xapofx1_4/Makefile.in
index b49e4643af6..36672e7760f 100644
index b49e464..36672e7 100644
--- a/dlls/xapofx1_4/Makefile.in
+++ b/dlls/xapofx1_4/Makefile.in
@@ -1,6 +1,8 @@
@ -234,7 +234,7 @@ index b49e4643af6..36672e7760f 100644
C_SRCS = \
diff --git a/dlls/xapofx1_5/Makefile.in b/dlls/xapofx1_5/Makefile.in
index 5055a16fd54..f9244f593ac 100644
index 5055a16..f9244f5 100644
--- a/dlls/xapofx1_5/Makefile.in
+++ b/dlls/xapofx1_5/Makefile.in
@@ -1,6 +1,8 @@
@ -247,7 +247,7 @@ index 5055a16fd54..f9244f593ac 100644
C_SRCS = \
diff --git a/dlls/xaudio2_0/Makefile.in b/dlls/xaudio2_0/Makefile.in
index cf15c7bf022..d8d282bcdeb 100644
index cf15c7b..d8d282b 100644
--- a/dlls/xaudio2_0/Makefile.in
+++ b/dlls/xaudio2_0/Makefile.in
@@ -1,7 +1,8 @@
@ -261,7 +261,7 @@ index cf15c7bf022..d8d282bcdeb 100644
C_SRCS = \
diff --git a/dlls/xaudio2_1/Makefile.in b/dlls/xaudio2_1/Makefile.in
index 32a5a62a2ae..a0d7bfc7cbf 100644
index 32a5a62..a0d7bfc 100644
--- a/dlls/xaudio2_1/Makefile.in
+++ b/dlls/xaudio2_1/Makefile.in
@@ -1,7 +1,8 @@
@ -275,7 +275,7 @@ index 32a5a62a2ae..a0d7bfc7cbf 100644
C_SRCS = \
diff --git a/dlls/xaudio2_2/Makefile.in b/dlls/xaudio2_2/Makefile.in
index f20de2d5f4e..4ba7e6c34a6 100644
index f20de2d..4ba7e6c 100644
--- a/dlls/xaudio2_2/Makefile.in
+++ b/dlls/xaudio2_2/Makefile.in
@@ -1,7 +1,8 @@
@ -289,7 +289,7 @@ index f20de2d5f4e..4ba7e6c34a6 100644
C_SRCS = \
diff --git a/dlls/xaudio2_3/Makefile.in b/dlls/xaudio2_3/Makefile.in
index ca749f247b1..62c644f6e6f 100644
index ca749f2..62c644f 100644
--- a/dlls/xaudio2_3/Makefile.in
+++ b/dlls/xaudio2_3/Makefile.in
@@ -1,7 +1,8 @@
@ -303,7 +303,7 @@ index ca749f247b1..62c644f6e6f 100644
C_SRCS = \
diff --git a/dlls/xaudio2_4/Makefile.in b/dlls/xaudio2_4/Makefile.in
index 0b74f68fdc6..b77753fb069 100644
index 0b74f68..b77753f 100644
--- a/dlls/xaudio2_4/Makefile.in
+++ b/dlls/xaudio2_4/Makefile.in
@@ -1,7 +1,8 @@
@ -317,7 +317,7 @@ index 0b74f68fdc6..b77753fb069 100644
C_SRCS = \
diff --git a/dlls/xaudio2_5/Makefile.in b/dlls/xaudio2_5/Makefile.in
index 09356c94ac7..bd687348911 100644
index 09356c9..bd68734 100644
--- a/dlls/xaudio2_5/Makefile.in
+++ b/dlls/xaudio2_5/Makefile.in
@@ -1,7 +1,8 @@
@ -331,7 +331,7 @@ index 09356c94ac7..bd687348911 100644
C_SRCS = \
diff --git a/dlls/xaudio2_6/Makefile.in b/dlls/xaudio2_6/Makefile.in
index e0ef588158d..17295098f0f 100644
index e0ef588..1729509 100644
--- a/dlls/xaudio2_6/Makefile.in
+++ b/dlls/xaudio2_6/Makefile.in
@@ -1,7 +1,8 @@
@ -345,7 +345,7 @@ index e0ef588158d..17295098f0f 100644
C_SRCS = \
diff --git a/dlls/xaudio2_7/Makefile.in b/dlls/xaudio2_7/Makefile.in
index 2f2e2320072..41d307dca7c 100644
index 2f2e232..41d307d 100644
--- a/dlls/xaudio2_7/Makefile.in
+++ b/dlls/xaudio2_7/Makefile.in
@@ -1,7 +1,8 @@
@ -359,7 +359,7 @@ index 2f2e2320072..41d307dca7c 100644
C_SRCS = \
compat.c \
diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c
index e52d9624d3b..319c2392c66 100644
index 0bbe943..2e65f47 100644
--- a/dlls/xaudio2_7/xaudio_dll.c
+++ b/dlls/xaudio2_7/xaudio_dll.c
@@ -82,6 +82,11 @@ __ASM_GLOBAL_FUNC( call_on_voice_processing_pass_start,
@ -525,7 +525,7 @@ index e52d9624d3b..319c2392c66 100644
/* ADPCM gives us a number of samples per block, so round down to
* nearest block and convert to bytes */
buf->xa2buffer.PlayBegin = buf->xa2buffer.PlayBegin / ((ADPCMWAVEFORMAT*)This->fmt)->wSamplesPerBlock * This->fmt->nBlockAlign;
@@ -1513,19 +1632,119 @@ static HRESULT WINAPI IXAudio2Impl_CreateSourceVoice(IXAudio2 *iface,
@@ -1515,19 +1634,119 @@ static HRESULT WINAPI IXAudio2Impl_CreateSourceVoice(IXAudio2 *iface,
src->al_fmt = get_al_format(pSourceFormat);
if(!src->al_fmt){
@ -651,7 +651,7 @@ index e52d9624d3b..319c2392c66 100644
src->in_use = FALSE;
LeaveCriticalSection(&src->lock);
return hr;
@@ -2255,6 +2474,9 @@ HRESULT WINAPI XAudio2Create(IXAudio2 **ppxa2, UINT32 flags, XAUDIO2_PROCESSOR p
@@ -2257,6 +2476,9 @@ HRESULT WINAPI XAudio2Create(IXAudio2 **ppxa2, UINT32 flags, XAUDIO2_PROCESSOR p
* buffer's data has all been queued */
static BOOL xa2buffer_queue_period(XA2SourceImpl *src, XA2Buffer *buf, ALuint al_buf)
{
@ -661,7 +661,7 @@ index e52d9624d3b..319c2392c66 100644
UINT32 submit_bytes;
const BYTE *submit_buf = NULL;
@@ -2263,9 +2485,133 @@ static BOOL xa2buffer_queue_period(XA2SourceImpl *src, XA2Buffer *buf, ALuint al
@@ -2265,9 +2487,133 @@ static BOOL xa2buffer_queue_period(XA2SourceImpl *src, XA2Buffer *buf, ALuint al
return FALSE;
}
@ -798,7 +798,7 @@ index e52d9624d3b..319c2392c66 100644
alBufferData(al_buf, src->al_fmt, submit_buf, submit_bytes,
src->fmt->nSamplesPerSec);
@@ -2288,6 +2634,10 @@ static UINT32 get_underrun_warning(XA2SourceImpl *src)
@@ -2290,6 +2636,10 @@ static UINT32 get_underrun_warning(XA2SourceImpl *src)
UINT32 period_bytes = src->xa2->period_frames * src->submit_blocksize;
UINT32 total = 0, i;
@ -810,7 +810,7 @@ index e52d9624d3b..319c2392c66 100644
XA2Buffer *buf = &src->buffers[(src->first_buf + i) % XAUDIO2_MAX_QUEUED_BUFFERS];
total += buf->cur_end_bytes - buf->offs_bytes;
diff --git a/dlls/xaudio2_7/xaudio_private.h b/dlls/xaudio2_7/xaudio_private.h
index 5d3814fb9ef..9cf7f003c41 100644
index 5d3814fb..9cf7f00 100644
--- a/dlls/xaudio2_7/xaudio_private.h
+++ b/dlls/xaudio2_7/xaudio_private.h
@@ -29,6 +29,10 @@
@ -837,7 +837,7 @@ index 5d3814fb9ef..9cf7f003c41 100644
} XA2SourceImpl;
diff --git a/dlls/xaudio2_8/Makefile.in b/dlls/xaudio2_8/Makefile.in
index d4efc41d5c3..8ad071f4805 100644
index d4efc41..8ad071f 100644
--- a/dlls/xaudio2_8/Makefile.in
+++ b/dlls/xaudio2_8/Makefile.in
@@ -1,7 +1,8 @@
@ -851,7 +851,7 @@ index d4efc41d5c3..8ad071f4805 100644
C_SRCS = \
diff --git a/dlls/xaudio2_9/Makefile.in b/dlls/xaudio2_9/Makefile.in
index ceb2216f5a2..0243ed6740d 100644
index ceb2216..0243ed6 100644
--- a/dlls/xaudio2_9/Makefile.in
+++ b/dlls/xaudio2_9/Makefile.in
@@ -1,7 +1,8 @@
@ -865,10 +865,10 @@ index ceb2216f5a2..0243ed6740d 100644
C_SRCS = \
diff --git a/include/config.h.in b/include/config.h.in
index c3247cb21fe..7067a10e8bf 100644
index 545e0d6..e1ffa19 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -408,6 +408,15 @@
@@ -396,6 +396,15 @@
/* Define to 1 if you have the `lgammaf' function. */
#undef HAVE_LGAMMAF
@ -885,21 +885,17 @@ index c3247cb21fe..7067a10e8bf 100644
#undef HAVE_LIBGETTEXTPO
diff --git a/include/mmreg.h b/include/mmreg.h
index 8bb581dd792..1214dfa93f5 100644
index e7d70bb..3e22079 100644
--- a/include/mmreg.h
+++ b/include/mmreg.h
@@ -110,6 +110,11 @@ typedef struct _WAVEFORMATEX {
#define WAVE_FORMAT_MPEG 0x0050 /* Microsoft Corporation */
@@ -117,6 +117,7 @@ typedef struct _WAVEFORMATEX {
#define WAVE_FORMAT_MPEGLAYER3 0x0055
#define WAVE_FORMAT_MSRT24 0x0082 /* Microsoft Corporation */
#define WAVE_FORMAT_DOLBY_AC3_SPDIF 0x0092
+#define WAVE_FORMAT_MSAUDIO1 0x0160
+#define WAVE_FORMAT_WMAUDIO2 0x0161
+#define WAVE_FORMAT_WMAUDIO3 0x0162
+#define WAVE_FORMAT_WMAUDIO_LOSSLESS 0x0163
+
#define WAVE_FORMAT_CREATIVE_ADPCM 0x0200 /* Creative Labs, Inc */
#define WAVE_FORMAT_CREATIVE_FASTSPEECH8 0x0202 /* Creative Labs, Inc */
#define WAVE_FORMAT_CREATIVE_FASTSPEECH10 0x0203 /* Creative Labs, Inc */
#define WAVE_FORMAT_WMAUDIO2 0x0161
#define WAVE_FORMAT_WMAUDIO3 0x0162
#define WAVE_FORMAT_WMAUDIO_LOSSLESS 0x0163
--
2.18.0
1.9.1