diff --git a/patches/odbc32-fixes/definition b/patches/odbc32-fixes/definition index 78401d59..aced6dd6 100644 --- a/patches/odbc32-fixes/definition +++ b/patches/odbc32-fixes/definition @@ -1 +1 @@ -Fixes: [54499] Support native ODBC drivers. +Fixes: [56786] Support ODBC v2.0 drivers. diff --git a/patches/odbccp32-SQLWritePrivateProfileStringW/0001-odbccp32-Support-System-wide-ODBC-DSN-keys.patch b/patches/odbccp32-SQLWritePrivateProfileStringW/0001-odbccp32-Support-System-wide-ODBC-DSN-keys.patch deleted file mode 100644 index ce56e719..00000000 --- a/patches/odbccp32-SQLWritePrivateProfileStringW/0001-odbccp32-Support-System-wide-ODBC-DSN-keys.patch +++ /dev/null @@ -1,50 +0,0 @@ -From bea6b99a50c4de12c03d6dd68e9f246b854f9550 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 8 Jun 2024 10:24:40 +1000 -Subject: [PATCH 1/2] odbccp32: Support System wide ODBC DSN keys - ---- - dlls/odbccp32/odbccp32.c | 22 ++++++++++++++-------- - 1 file changed, 14 insertions(+), 8 deletions(-) - -diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c -index 95bfb90781e..7846f29584f 100644 ---- a/dlls/odbccp32/odbccp32.c -+++ b/dlls/odbccp32/odbccp32.c -@@ -713,19 +713,25 @@ BOOL WINAPI SQLGetInstalledDrivers(char *buf, WORD size, WORD *sizeout) - - static HKEY get_privateprofile_sectionkey(LPCWSTR section, LPCWSTR filename) - { -- HKEY hkey, hkeyfilename, hkeysection; -+ HKEY hkeysection; - LONG ret; -+ WCHAR *regpath; - -- if (RegOpenKeyW(HKEY_CURRENT_USER, odbcW, &hkey)) -+ regpath = malloc ( (wcslen(L"Software\\ODBC\\") + wcslen(filename) + wcslen(L"\\") -+ + wcslen(section) + 1) * sizeof(WCHAR)); -+ if (!regpath) - return NULL; - -- ret = RegOpenKeyW(hkey, filename, &hkeyfilename); -- RegCloseKey(hkey); -- if (ret) -- return NULL; -+ wcscpy(regpath, L"Software\\ODBC\\"); -+ wcscat(regpath, filename); -+ wcscat(regpath, L"\\"); -+ wcscat(regpath, section); - -- ret = RegOpenKeyW(hkeyfilename, section, &hkeysection); -- RegCloseKey(hkeyfilename); -+ if ((ret = RegOpenKeyW(HKEY_CURRENT_USER, regpath, &hkeysection)) != ERROR_SUCCESS) -+ { -+ ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, regpath, &hkeysection); -+ } -+ free(regpath); - - return ret ? NULL : hkeysection; - } --- -2.43.0 - diff --git a/patches/odbccp32-SQLWritePrivateProfileStringW/0002-odbccp32-SQLWritePrivateProfileStringW-check-for-exi.patch b/patches/odbccp32-SQLWritePrivateProfileStringW/0002-odbccp32-SQLWritePrivateProfileStringW-check-for-exi.patch deleted file mode 100644 index 94e965a8..00000000 --- a/patches/odbccp32-SQLWritePrivateProfileStringW/0002-odbccp32-SQLWritePrivateProfileStringW-check-for-exi.patch +++ /dev/null @@ -1,63 +0,0 @@ -From e7ef9385cd21edecf8229f85e7c4a8f5436164c0 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 8 Jun 2024 15:08:08 +1000 -Subject: [PATCH 2/2] odbccp32: SQLWritePrivateProfileStringW check for - existing DSN first - -If a DSN is System wide, we need to write to the HKEY_LOCAL_MACHINE -part of the registry not HKEY_CURRENT_USER which it's currently doing. ---- - dlls/odbccp32/odbccp32.c | 30 +++++++++++++++++++++++++++++- - 1 file changed, 29 insertions(+), 1 deletion(-) - -diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c -index 7846f29584f..470bc170618 100644 ---- a/dlls/odbccp32/odbccp32.c -+++ b/dlls/odbccp32/odbccp32.c -@@ -1810,6 +1810,7 @@ BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry - static const WCHAR empty[] = {0}; - LONG ret; - HKEY hkey; -+ WCHAR *regpath; - - clear_errors(); - TRACE("%s %s %s %s\n", debugstr_w(lpszSection), debugstr_w(lpszEntry), -@@ -1821,7 +1822,34 @@ BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry - return FALSE; - } - -- if ((ret = RegCreateKeyW(HKEY_CURRENT_USER, odbcW, &hkey)) == ERROR_SUCCESS) -+ regpath = malloc ( (wcslen(L"Software\\ODBC\\") + wcslen(lpszFilename) + wcslen(L"\\") -+ + wcslen(lpszSection) + 1) * sizeof(WCHAR)); -+ if (!regpath) -+ { -+ push_error(ODBC_ERROR_OUT_OF_MEM, odbc_error_out_of_mem); -+ return FALSE; -+ } -+ wcscpy(regpath, L"Software\\ODBC\\"); -+ wcscat(regpath, lpszFilename); -+ wcscat(regpath, L"\\"); -+ wcscat(regpath, lpszSection); -+ -+ /* Check an existing key first before writing a new one */ -+ if ((ret = RegOpenKeyW(HKEY_CURRENT_USER, regpath, &hkey)) != ERROR_SUCCESS) -+ { -+ ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, regpath, &hkey); -+ } -+ free(regpath); -+ -+ if (ret == ERROR_SUCCESS) -+ { -+ if(lpszString) -+ ret = RegSetValueExW(hkey, lpszEntry, 0, REG_SZ, (BYTE*)lpszString, (lstrlenW(lpszString)+1)*sizeof(WCHAR)); -+ else -+ ret = RegSetValueExW(hkey, lpszEntry, 0, REG_SZ, (BYTE*)empty, sizeof(empty)); -+ RegCloseKey(hkey); -+ } -+ else if ((ret = RegCreateKeyW(HKEY_CURRENT_USER, odbcW, &hkey)) == ERROR_SUCCESS) - { - HKEY hkeyfilename; - --- -2.43.0 - diff --git a/patches/odbccp32-SQLWritePrivateProfileStringW/definition b/patches/odbccp32-SQLWritePrivateProfileStringW/definition deleted file mode 100644 index 3b16c37d..00000000 --- a/patches/odbccp32-SQLWritePrivateProfileStringW/definition +++ /dev/null @@ -1,4 +0,0 @@ -Fixes: [56786] odbccp32: Correct lookup of DSN before writing to registry. - -#PR: https://gitlab.winehq.org/wine/wine/-/merge_requests/5812 - diff --git a/patches/oleaut32-Load_Save_EMF/0001-oleaut32-tests-Add-some-tests-for-loading-and-saving.patch b/patches/oleaut32-Load_Save_EMF/0001-oleaut32-tests-Add-some-tests-for-loading-and-saving.patch index a565cab5..a0367417 100644 --- a/patches/oleaut32-Load_Save_EMF/0001-oleaut32-tests-Add-some-tests-for-loading-and-saving.patch +++ b/patches/oleaut32-Load_Save_EMF/0001-oleaut32-tests-Add-some-tests-for-loading-and-saving.patch @@ -1,19 +1,19 @@ -From f68ed438045727c64905bee9356a46320e4cb489 Mon Sep 17 00:00:00 2001 +From 5dbd2569a120af6eea544a4738b071ee8e63e8c6 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 26 Apr 2016 12:11:17 +0800 -Subject: oleaut32/tests: Add some tests for loading and saving EMF using - IPicture interface. +Subject: [PATCH] oleaut32/tests: Add some tests for loading and saving EMF + using IPicture interface. --- - dlls/oleaut32/tests/olepicture.c | 90 ++++++++++++++++++++++++++++++++++++++++ + dlls/oleaut32/tests/olepicture.c | 90 ++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c -index 0903298..de45603 100644 +index f0468a6f83c..f06befd2976 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c -@@ -1305,6 +1305,95 @@ todo_wine - IStream_Release(stream); +@@ -1613,6 +1613,95 @@ static void test_load_save_dib(void) + } } +static void test_load_save_emf(void) @@ -108,8 +108,8 @@ index 0903298..de45603 100644 START_TEST(olepicture) { hOleaut32 = GetModuleHandleA("oleaut32.dll"); -@@ -1344,6 +1433,7 @@ START_TEST(olepicture) - test_load_save_bmp(); +@@ -1653,6 +1742,7 @@ START_TEST(olepicture) + test_load_save_dib(); test_load_save_icon(); test_load_save_empty_picture(); + test_load_save_emf(); @@ -117,5 +117,5 @@ index 0903298..de45603 100644 -- -2.8.0 +2.43.0 diff --git a/staging/upstream-commit b/staging/upstream-commit index 9761502c..8fdc2c4f 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -75f8de6bd41c945abe230e8fd1d8645f30b7667f +16a6b0ad65e9b8cdbb68fc9125951483781ca616