You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b4006fc038 | ||
|
d1cc8d0fa5 | ||
|
ef72380f02 | ||
|
1b2e959b75 | ||
|
31a37e3f3c | ||
|
a3738434e0 | ||
|
554a64f6b3 | ||
|
7f2c4b8613 | ||
|
47f77594ab | ||
|
4adf613941 | ||
|
b3fc3b367a | ||
|
0b9581fa6a | ||
|
06a7d6349e | ||
|
86a7c93cdd | ||
|
abf4b4db07 | ||
|
b4d8b2f64f | ||
|
092b56c39c | ||
|
2cd8221624 | ||
|
e855d43a60 | ||
|
f95009bb3e | ||
|
edfe4935ff | ||
|
b8110be095 | ||
|
42a307df67 | ||
|
c89fe8069e | ||
|
eff3de6ad2 | ||
|
9f89b77e8f | ||
|
74dd8bdd2a | ||
|
f01e66252c | ||
|
353a868136 | ||
|
ee5092247c | ||
|
e54c70a009 | ||
|
1b8ab6cb68 | ||
|
81425de332 | ||
|
c2d96a3c91 | ||
|
292830fa82 | ||
|
6912feaf65 | ||
|
aa0c8391eb | ||
|
36020b4a0e | ||
|
4fa7fcd631 | ||
|
ebf36e4717 |
@@ -1,231 +0,0 @@
|
||||
From e6c1c1fe3fe2f4fe7d3e421b94d925c40063af22 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 5 Jul 2019 13:20:23 +0800
|
||||
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
configure | 1 +
|
||||
configure.ac | 1 +
|
||||
dlls/cryptext/Makefile.in | 3 +-
|
||||
dlls/cryptext/cryptext.spec | 4 +--
|
||||
dlls/cryptext/cryptext_main.c | 64 +++++++++++++++++++++++++++++++++
|
||||
dlls/cryptext/tests/Makefile.in | 4 +++
|
||||
dlls/cryptext/tests/cryptext.c | 61 +++++++++++++++++++++++++++++++
|
||||
7 files changed, 135 insertions(+), 3 deletions(-)
|
||||
create mode 100644 dlls/cryptext/tests/Makefile.in
|
||||
create mode 100644 dlls/cryptext/tests/cryptext.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ca6e87d4740..7033499399f 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -21660,6 +21660,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
|
||||
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
|
||||
wine_fn_config_makefile dlls/cryptext enable_cryptext
|
||||
+wine_fn_config_makefile dlls/cryptext/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptnet enable_cryptnet
|
||||
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptowinrt enable_cryptowinrt
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cba55126869..57064a05fe5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2477,6 +2477,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptext)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/cryptext/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptowinrt)
|
||||
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
|
||||
index 5598bfb78e0..acda4e4ac6d 100644
|
||||
--- a/dlls/cryptext/Makefile.in
|
||||
+++ b/dlls/cryptext/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
-MODULE = cryptext.dll
|
||||
+MODULE = cryptext.dll
|
||||
+IMPORTS = crypt32 cryptui user32
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec
|
||||
index ee3e155f457..24b4794c198 100644
|
||||
--- a/dlls/cryptext/cryptext.spec
|
||||
+++ b/dlls/cryptext/cryptext.spec
|
||||
@@ -12,8 +12,8 @@
|
||||
@ stub CryptExtAddSPCW
|
||||
@ stub CryptExtOpenCAT
|
||||
@ stub CryptExtOpenCATW
|
||||
-@ stub CryptExtOpenCER
|
||||
-@ stub CryptExtOpenCERW
|
||||
+@ stdcall CryptExtOpenCER(long ptr str long)
|
||||
+@ stdcall CryptExtOpenCERW(long ptr wstr long)
|
||||
@ stub CryptExtOpenCRL
|
||||
@ stub CryptExtOpenCRLW
|
||||
@ stub CryptExtOpenCTL
|
||||
diff --git a/dlls/cryptext/cryptext_main.c b/dlls/cryptext/cryptext_main.c
|
||||
index 537ba66cd3b..a4314518eac 100644
|
||||
--- a/dlls/cryptext/cryptext_main.c
|
||||
+++ b/dlls/cryptext/cryptext_main.c
|
||||
@@ -22,10 +22,29 @@
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
+#include "winnls.h"
|
||||
+#include "wincrypt.h"
|
||||
+#include "winuser.h"
|
||||
+#include "cryptuiapi.h"
|
||||
+
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cryptext);
|
||||
|
||||
+static WCHAR *heap_strdupAtoW(const char *str)
|
||||
+{
|
||||
+ WCHAR *ret;
|
||||
+ INT len;
|
||||
+
|
||||
+ if (!str) return NULL;
|
||||
+ len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
+ ret = heap_alloc(len * sizeof(WCHAR));
|
||||
+ if (ret)
|
||||
+ MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* CryptExtAddPFX (CRYPTEXT.@)
|
||||
*/
|
||||
@@ -43,3 +62,48 @@ HRESULT WINAPI CryptExtAddPFXW(LPCWSTR filename)
|
||||
FIXME("stub: %s\n", debugstr_w(filename));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * CryptExtOpenCERW (CRYPTEXT.@)
|
||||
+ */
|
||||
+HRESULT WINAPI CryptExtOpenCERW(HWND hwnd, HINSTANCE hinst, LPCWSTR filename, DWORD showcmd)
|
||||
+{
|
||||
+ PCCERT_CONTEXT ctx;
|
||||
+ CRYPTUI_VIEWCERTIFICATE_STRUCTW info;
|
||||
+
|
||||
+ TRACE("(%p, %p, %s, %lu)\n", hwnd, hinst, debugstr_w(filename), showcmd);
|
||||
+
|
||||
+ if (!CryptQueryObject(CERT_QUERY_OBJECT_FILE, filename, CERT_QUERY_CONTENT_FLAG_CERT,
|
||||
+ CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL,
|
||||
+ (const void **)&ctx))
|
||||
+ {
|
||||
+ /* FIXME: move to the resources */
|
||||
+ static const WCHAR msg[] = {'T','h','i','s',' ','i','s',' ','n','o','t',' ','a',' ','v','a','l','i','d',' ','c','e','r','t','i','f','i','c','a','t','e',0};
|
||||
+ MessageBoxW(NULL, msg, filename, MB_OK | MB_ICONERROR);
|
||||
+ return S_OK; /* according to the tests */
|
||||
+ }
|
||||
+
|
||||
+ memset(&info, 0, sizeof(info));
|
||||
+ info.dwSize = sizeof(info);
|
||||
+ info.pCertContext = ctx;
|
||||
+ CryptUIDlgViewCertificateW(&info, NULL);
|
||||
+ CertFreeCertificateContext(ctx);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * CryptExtOpenCER (CRYPTEXT.@)
|
||||
+ */
|
||||
+HRESULT WINAPI CryptExtOpenCER(HWND hwnd, HINSTANCE hinst, LPCSTR filename, DWORD showcmd)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ LPWSTR filenameW;
|
||||
+
|
||||
+ TRACE("(%p, %p, %s, %lu)\n", hwnd, hinst, debugstr_a(filename), showcmd);
|
||||
+
|
||||
+ filenameW = heap_strdupAtoW(filename);
|
||||
+ hr = CryptExtOpenCERW(hwnd, hinst, filenameW, showcmd);
|
||||
+ heap_free(filenameW);
|
||||
+ return hr;
|
||||
+}
|
||||
diff --git a/dlls/cryptext/tests/Makefile.in b/dlls/cryptext/tests/Makefile.in
|
||||
new file mode 100644
|
||||
index 00000000000..c3f4551fc00
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/Makefile.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+TESTDLL = cryptext.dll
|
||||
+
|
||||
+SOURCES = \
|
||||
+ cryptext.c
|
||||
diff --git a/dlls/cryptext/tests/cryptext.c b/dlls/cryptext/tests/cryptext.c
|
||||
new file mode 100644
|
||||
index 00000000000..ab1007dbd82
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/cryptext.c
|
||||
@@ -0,0 +1,61 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+#include <assert.h>
|
||||
+#include <windef.h>
|
||||
+#include <winbase.h>
|
||||
+#include <winuser.h>
|
||||
+#include <winerror.h>
|
||||
+
|
||||
+#include "wine/test.h"
|
||||
+
|
||||
+static HRESULT (WINAPI *pCryptExtOpenCER)(HWND,HINSTANCE,LPCSTR,DWORD);
|
||||
+
|
||||
+static void test_CryptExtOpenCER(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ if (!pCryptExtOpenCER)
|
||||
+ {
|
||||
+ win_skip("CryptExtOpenCER is not available on this platform\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!winetest_interactive)
|
||||
+ {
|
||||
+ skip("CryptExtOpenCER test needs user interaction\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ hr = pCryptExtOpenCER(0, 0, "dead.beef", SW_HIDE);
|
||||
+ ok(hr == S_OK, "got %#lx\n", hr);
|
||||
+
|
||||
+ hr = pCryptExtOpenCER(0, 0, "VeriSign Class 3 Public Primary Certification Authority - G4.txt", SW_SHOW);
|
||||
+ ok(hr == S_OK, "got %#lx\n", hr);
|
||||
+}
|
||||
+
|
||||
+START_TEST(cryptext)
|
||||
+{
|
||||
+ HMODULE hmod = LoadLibraryA("cryptext.dll");
|
||||
+
|
||||
+ pCryptExtOpenCER = (void *)GetProcAddress(hmod, "CryptExtOpenCER");
|
||||
+
|
||||
+ test_CryptExtOpenCER();
|
||||
+}
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -1,2 +0,0 @@
|
||||
# Taken from the mailing list - July 2019.
|
||||
Fixes: cryptext: Implement CryptExtOpenCER.
|
@@ -1,118 +0,0 @@
|
||||
From 71d1c176af87bdc48326d5883fbea608314ee0a4 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:29:30 +0100
|
||||
Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
texture to dds file.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_private.h | 2 ++
|
||||
dlls/d3dx9_36/surface.c | 63 +++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/texture.c | 5 +--
|
||||
3 files changed, 66 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
|
||||
index 6a9b3e12b7b..0c6374f35ca 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_private.h
|
||||
+++ b/dlls/d3dx9_36/d3dx9_private.h
|
||||
@@ -316,6 +316,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
IDirect3DSurface9 **temp_surface, BOOL write);
|
||||
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
|
||||
IDirect3DSurface9 *temp_surface, BOOL update);
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture,
|
||||
+ const PALETTEENTRY *src_palette);
|
||||
HRESULT d3dx_pixels_init(const void *data, uint32_t row_pitch, uint32_t slice_pitch,
|
||||
const PALETTEENTRY *palette, enum d3dx_pixel_format_id format, uint32_t left, uint32_t top, uint32_t right,
|
||||
uint32_t bottom, uint32_t front, uint32_t back, struct d3dx_pixels *pixels);
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index 9d2dc96a979..912a3e3c849 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -628,6 +628,69 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT get_surface(D3DRESOURCETYPE type, struct IDirect3DBaseTexture9 *tex,
|
||||
+ int face, UINT level, struct IDirect3DSurface9 **surf)
|
||||
+{
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case D3DRTYPE_TEXTURE:
|
||||
+ return IDirect3DTexture9_GetSurfaceLevel((IDirect3DTexture9*) tex, level, surf);
|
||||
+ case D3DRTYPE_CUBETEXTURE:
|
||||
+ return IDirect3DCubeTexture9_GetCubeMapSurface((IDirect3DCubeTexture9*) tex, face, level, surf);
|
||||
+ default:
|
||||
+ ERR("Unexpected texture type\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ D3DRESOURCETYPE type;
|
||||
+ UINT mip_levels;
|
||||
+ IDirect3DSurface9 *surface;
|
||||
+
|
||||
+ type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
+
|
||||
+ if ((type != D3DRTYPE_TEXTURE) && (type != D3DRTYPE_CUBETEXTURE) && (type != D3DRTYPE_VOLUMETEXTURE))
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ if (type == D3DRTYPE_CUBETEXTURE)
|
||||
+ {
|
||||
+ FIXME("Cube texture not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+ else if (type == D3DRTYPE_VOLUMETEXTURE)
|
||||
+ {
|
||||
+ FIXME("Volume texture not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ mip_levels = IDirect3DTexture9_GetLevelCount(src_texture);
|
||||
+
|
||||
+ if (mip_levels > 1)
|
||||
+ {
|
||||
+ FIXME("Mipmap not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ if (src_palette)
|
||||
+ {
|
||||
+ FIXME("Saving surfaces with palettized pixel formats not implemented yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ hr = get_surface(type, src_texture, D3DCUBEMAP_FACE_POSITIVE_X, 0, &surface);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ hr = save_dds_surface_to_memory(dst_buffer, surface, NULL, NULL);
|
||||
+ IDirect3DSurface9_Release(surface);
|
||||
+ }
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
static const uint8_t bmp_file_signature[] = { 'B', 'M' };
|
||||
static const uint8_t jpg_file_signature[] = { 0xff, 0xd8 };
|
||||
static const uint8_t png_file_signature[] = { 0x89, 'P', 'N', 'G', 0x0d, 0x0a, 0x1a, 0x0a };
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index 719a2787445..3f76ec209f9 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -1866,10 +1866,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
|
||||
|
||||
if (file_format == D3DXIFF_DDS)
|
||||
- {
|
||||
- FIXME("DDS file format isn't supported yet\n");
|
||||
- return E_NOTIMPL;
|
||||
- }
|
||||
+ return save_dds_texture_to_memory(dst_buffer, src_texture, src_palette);
|
||||
|
||||
type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
switch (type)
|
||||
--
|
||||
2.47.2
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: [26898] Support for DDS file format in D3DXSaveTextureToFileInMemory
|
||||
Disabled: True
|
@@ -1,4 +1,4 @@
|
||||
From 27e2bc1b0d098abce9168ea46589024054817e25 Mon Sep 17 00:00:00 2001
|
||||
From 52be83d9a557eec924a964944e6b926fb1e347ad Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:01:56 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for message queues.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] server: Create eventfd file descriptors for message queues.
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index ee575724e4e..60f0c043257 100644
|
||||
index a3479055ed4..08635c047b2 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -44,6 +44,7 @@
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "process.h"
|
||||
#include "request.h"
|
||||
#include "user.h"
|
||||
@@ -19,15 +19,15 @@ index ee575724e4e..60f0c043257 100644
|
||||
|
||||
#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
|
||||
#define WM_NCMOUSELAST (WM_NCMOUSEFIRST+(WM_MOUSELAST-WM_MOUSEFIRST))
|
||||
@@ -144,6 +145,7 @@ struct msg_queue
|
||||
@@ -135,6 +136,7 @@ struct msg_queue
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
const queue_shm_t *shared; /* queue in session shared memory */
|
||||
queue_shm_t *shared; /* queue in session shared memory */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
+ int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -160,6 +162,7 @@ static void msg_queue_dump( struct object *obj, int verbose );
|
||||
@@ -151,6 +153,7 @@ static void msg_queue_dump( struct object *obj, int verbose );
|
||||
static int msg_queue_add_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
static void msg_queue_remove_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
@@ -35,7 +35,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry );
|
||||
static void msg_queue_destroy( struct object *obj );
|
||||
static void msg_queue_poll_event( struct fd *fd, int event );
|
||||
@@ -175,7 +178,7 @@ static const struct object_ops msg_queue_ops =
|
||||
@@ -166,7 +169,7 @@ static const struct object_ops msg_queue_ops =
|
||||
msg_queue_add_queue, /* add_queue */
|
||||
msg_queue_remove_queue, /* remove_queue */
|
||||
msg_queue_signaled, /* signaled */
|
||||
@@ -44,7 +44,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
msg_queue_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -313,6 +316,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -317,6 +320,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->last_get_msg = current_time;
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
@@ -52,7 +52,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -335,6 +339,9 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -339,6 +343,9 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
}
|
||||
SHARED_WRITE_END;
|
||||
|
||||
@@ -62,7 +62,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
thread->queue = queue;
|
||||
|
||||
if ((desktop = get_thread_desktop( thread, 0 )))
|
||||
@@ -685,6 +692,9 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
|
||||
@@ -753,6 +760,9 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
|
||||
if (queue->keystate_lock) unlock_input_keystate( queue->input );
|
||||
queue->keystate_lock = 0;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
}
|
||||
|
||||
/* check if message is matched by the filter */
|
||||
@@ -1227,6 +1237,13 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
|
||||
@@ -1335,6 +1345,13 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
|
||||
return ret || is_signaled( queue );
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry )
|
||||
{
|
||||
struct msg_queue *queue = (struct msg_queue *)obj;
|
||||
@@ -1278,6 +1295,7 @@ static void msg_queue_destroy( struct object *obj )
|
||||
@@ -1391,6 +1408,7 @@ static void msg_queue_destroy( struct object *obj )
|
||||
if (queue->hooks) release_object( queue->hooks );
|
||||
if (queue->fd) release_object( queue->fd );
|
||||
if (queue->shared) free_shared_object( queue->shared );
|
||||
@@ -94,7 +94,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
}
|
||||
|
||||
static void msg_queue_poll_event( struct fd *fd, int event )
|
||||
@@ -3000,6 +3018,9 @@ DECL_HANDLER(set_queue_mask)
|
||||
@@ -3181,6 +3199,9 @@ DECL_HANDLER(set_queue_mask)
|
||||
}
|
||||
else wake_up( &queue->obj, 0 );
|
||||
}
|
||||
@@ -104,7 +104,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3020,6 +3041,9 @@ DECL_HANDLER(get_queue_status)
|
||||
@@ -3201,6 +3222,9 @@ DECL_HANDLER(get_queue_status)
|
||||
shared->changed_bits &= ~req->clear_bits;
|
||||
}
|
||||
SHARED_WRITE_END;
|
||||
@@ -114,7 +114,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
}
|
||||
else reply->wake_bits = reply->changed_bits = 0;
|
||||
}
|
||||
@@ -3286,6 +3310,10 @@ DECL_HANDLER(get_message)
|
||||
@@ -3469,6 +3493,10 @@ DECL_HANDLER(get_message)
|
||||
SHARED_WRITE_END;
|
||||
|
||||
set_error( STATUS_PENDING ); /* FIXME */
|
||||
@@ -126,5 +126,5 @@ index ee575724e4e..60f0c043257 100644
|
||||
|
||||
found_msg:
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 7522f4cf4bb29413bce97be5e61ebaefb5276c77 Mon Sep 17 00:00:00 2001
|
||||
From c9d64a429d4343f4ceb53ae28ecc380aaa42b09e Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:11:23 -0500
|
||||
Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
3 files changed, 77 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 399930c444b..06d7d8babc6 100644
|
||||
index b2204d44ed9..3af79a2de15 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -474,12 +474,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -476,12 +476,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
|
||||
/* A value of STATUS_NOT_IMPLEMENTED returned from this function means that we
|
||||
* need to delegate to server_select(). */
|
||||
@@ -28,7 +28,7 @@ index 399930c444b..06d7d8babc6 100644
|
||||
LONGLONG timeleft;
|
||||
LARGE_INTEGER now;
|
||||
ULONGLONG end;
|
||||
@@ -507,6 +508,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -509,6 +510,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ index 399930c444b..06d7d8babc6 100644
|
||||
if (has_esync && has_server)
|
||||
FIXME("Can't wait on esync and server objects at the same time!\n");
|
||||
else if (has_server)
|
||||
@@ -518,6 +522,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -520,6 +524,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
for (i = 0; i < count; i++)
|
||||
TRACE(" %p", handles[i]);
|
||||
|
||||
@@ -48,7 +48,7 @@ index 399930c444b..06d7d8babc6 100644
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
else
|
||||
@@ -557,7 +564,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -559,7 +566,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
@@ -59,7 +59,7 @@ index 399930c444b..06d7d8babc6 100644
|
||||
{
|
||||
/* Don't grab the object, just check if it's signaled. */
|
||||
if (fds[i].revents & POLLIN)
|
||||
@@ -602,6 +611,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -604,6 +613,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ index 399930c444b..06d7d8babc6 100644
|
||||
{
|
||||
struct stat st;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 56f2d263100..46cdbbed9b7 100644
|
||||
index 86040d5b619..c2fdec93b8d 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3968,6 +3968,10 @@ enum esync_type
|
||||
@@ -4121,6 +4121,10 @@ enum esync_type
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
|
||||
@@ -120,18 +120,18 @@ index 56f2d263100..46cdbbed9b7 100644
|
||||
@REQ(set_keyboard_repeat)
|
||||
int enable; /* whether to enable auto-repeat */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 60f0c043257..d6b6f2f20aa 100644
|
||||
index 08635c047b2..8f1a68acd7f 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -146,6 +146,7 @@ struct msg_queue
|
||||
const queue_shm_t *shared; /* queue in session shared memory */
|
||||
@@ -137,6 +137,7 @@ struct msg_queue
|
||||
queue_shm_t *shared; /* queue in session shared memory */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
+ int esync_in_msgwait; /* our thread is currently waiting on us */
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -317,6 +318,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -321,6 +322,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
queue->esync_fd = -1;
|
||||
@@ -139,7 +139,7 @@ index 60f0c043257..d6b6f2f20aa 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -1183,6 +1185,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
@@ -1291,6 +1293,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
if (get_wait_queue_thread(entry)->queue == queue)
|
||||
return 0; /* thread is waiting on queue -> not hung */
|
||||
}
|
||||
@@ -150,7 +150,7 @@ index 60f0c043257..d6b6f2f20aa 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4079,6 +4085,23 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
@@ -4281,6 +4287,23 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,11 +174,11 @@ index 60f0c043257..d6b6f2f20aa 100644
|
||||
DECL_HANDLER(set_keyboard_repeat)
|
||||
{
|
||||
struct desktop *desktop;
|
||||
@@ -4097,3 +4120,4 @@ DECL_HANDLER(set_keyboard_repeat)
|
||||
@@ -4299,3 +4322,4 @@ DECL_HANDLER(set_keyboard_repeat)
|
||||
|
||||
release_object( desktop );
|
||||
}
|
||||
+
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5f5cfac7099cf4e5be912f07a66665f8217f57f3 Mon Sep 17 00:00:00 2001
|
||||
From 50f9168ed92d261de21615b250dfac115160cc2e Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 17:17:31 -0500
|
||||
Subject: [PATCH] ntdll, server: Implement alertable waits.
|
||||
@@ -15,10 +15,10 @@ Subject: [PATCH] ntdll, server: Implement alertable waits.
|
||||
8 files changed, 109 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 2844f9f760c..aeeea1731ce 100644
|
||||
index f805af251bb..a80019b76dd 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -599,17 +599,42 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -601,17 +601,42 @@ static void update_grabbed_object( struct esync *obj )
|
||||
static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_any,
|
||||
BOOLEAN alertable, const LARGE_INTEGER *timeout )
|
||||
{
|
||||
@@ -62,7 +62,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
NtQuerySystemTime( &now );
|
||||
if (timeout)
|
||||
{
|
||||
@@ -648,6 +673,8 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -650,6 +675,8 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
|
||||
if (msgwait)
|
||||
TRACE(" or driver events");
|
||||
@@ -71,7 +71,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
@@ -684,12 +711,27 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -686,12 +713,27 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
fds[i].fd = obj ? obj->fd : -1;
|
||||
fds[i].events = POLLIN;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
/* Find out which object triggered the wait. */
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
@@ -763,6 +805,14 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -765,6 +807,14 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
tryagain:
|
||||
/* First step: try to poll on each object in sequence. */
|
||||
fds[0].events = POLLIN;
|
||||
@@ -115,7 +115,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
struct esync *obj = objs[i];
|
||||
@@ -778,9 +828,11 @@ tryagain:
|
||||
@@ -780,9 +830,11 @@ tryagain:
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
|
||||
if (fds[0].revents & (POLLHUP | POLLERR | POLLNVAL))
|
||||
{
|
||||
@@ -796,10 +848,12 @@ tryagain:
|
||||
@@ -798,10 +850,12 @@ tryagain:
|
||||
fds[i].fd = objs[i] ? objs[i]->fd : -1;
|
||||
fds[i].events = POLLIN;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
{
|
||||
/* Quick, grab everything. */
|
||||
for (i = 0; i < count; i++)
|
||||
@@ -865,6 +919,19 @@ err:
|
||||
@@ -867,6 +921,19 @@ err:
|
||||
ERR("ppoll failed: %s\n", strerror(errno));
|
||||
return errno_to_status( errno );
|
||||
}
|
||||
@@ -164,22 +164,22 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
|
||||
/* We need to let the server know when we are doing a message wait, and when we
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index b278ab8df84..a3f0368b731 100644
|
||||
index b9043351d57..283fd7d7ff6 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -93,6 +93,7 @@ struct ntdll_thread_data
|
||||
{
|
||||
void *cpu_data[16]; /* reserved for CPU-specific data */
|
||||
void *kernel_stack; /* stack for thread startup and kernel syscalls */
|
||||
+ int esync_apc_fd; /* fd to wait on for user APCs */
|
||||
int request_fd; /* fd for sending server requests */
|
||||
int reply_fd; /* fd for receiving server replies */
|
||||
int wait_fd[2]; /* fd for sleeping server requests */
|
||||
@@ -105,6 +105,7 @@ struct ntdll_thread_data
|
||||
SYSTEM_SERVICE_TABLE *syscall_table; /* 214/0370 syscall table */
|
||||
struct syscall_frame *syscall_frame; /* 218/0378 current syscall frame */
|
||||
int syscall_trace; /* 21c/0380 syscall trace flag */
|
||||
+ int esync_apc_fd; /* fd to wait on for user APCs */
|
||||
int request_fd; /* fd for sending server requests */
|
||||
int reply_fd; /* fd for receiving server replies */
|
||||
int wait_fd[2]; /* fd for sleeping server requests */
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 2116b677adb..a7d0bb7e8c8 100644
|
||||
index c797c89952f..0778ad73984 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -3646,6 +3646,7 @@ static TEB *init_teb( void *ptr, BOOL is_wow )
|
||||
@@ -4014,6 +4014,7 @@ static TEB *init_teb( void *ptr, BOOL is_wow )
|
||||
teb->StaticUnicodeString.Buffer = teb->StaticUnicodeBuffer;
|
||||
teb->StaticUnicodeString.MaximumLength = sizeof(teb->StaticUnicodeBuffer);
|
||||
thread_data = (struct ntdll_thread_data *)&teb->GdiTebBatch;
|
||||
@@ -244,10 +244,10 @@ index 689d8569b73..e1588d205d9 100644
|
||||
void esync_clear( int fd );
|
||||
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 8c728080d05..3ea700054c6 100644
|
||||
index 807298b6bab..a2dcdd37204 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3935,3 +3935,7 @@ enum esync_type
|
||||
@@ -4148,3 +4148,7 @@ enum esync_type
|
||||
@REPLY
|
||||
int enable; /* previous state of auto-repeat enable */
|
||||
@END
|
||||
@@ -256,10 +256,10 @@ index 8c728080d05..3ea700054c6 100644
|
||||
+@REQ(get_esync_apc_fd)
|
||||
+@END
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index fd6b91b228a..8d7c520ced7 100644
|
||||
index 11c36e49ae4..3a771838a98 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -232,6 +232,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
@@ -400,6 +400,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
thread->teb = 0;
|
||||
thread->entry_point = 0;
|
||||
thread->esync_fd = -1;
|
||||
@@ -267,7 +267,7 @@ index fd6b91b228a..8d7c520ced7 100644
|
||||
thread->system_regs = 0;
|
||||
thread->queue = NULL;
|
||||
thread->wait = NULL;
|
||||
@@ -380,7 +381,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
@@ -550,7 +551,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
}
|
||||
|
||||
if (do_esync())
|
||||
@@ -278,7 +278,7 @@ index fd6b91b228a..8d7c520ced7 100644
|
||||
|
||||
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
|
||||
add_process_thread( thread->process, thread );
|
||||
@@ -1174,8 +1178,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
@@ -1384,8 +1388,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
grab_object( apc );
|
||||
list_add_tail( queue, &apc->entry );
|
||||
if (!list_prev( queue, &apc->entry )) /* first one */
|
||||
@@ -292,7 +292,7 @@ index fd6b91b228a..8d7c520ced7 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1221,6 +1230,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system
|
||||
@@ -1431,6 +1440,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system
|
||||
apc = LIST_ENTRY( ptr, struct thread_apc, entry );
|
||||
list_remove( ptr );
|
||||
}
|
||||
@@ -304,10 +304,10 @@ index fd6b91b228a..8d7c520ced7 100644
|
||||
}
|
||||
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index 9129e473ba9..10e9e28b432 100644
|
||||
index e826a7a25de..c320ac83af7 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -56,6 +56,7 @@ struct thread
|
||||
@@ -57,6 +57,7 @@ struct thread
|
||||
thread_id_t id; /* thread id */
|
||||
struct list mutex_list; /* list of currently owned mutexes */
|
||||
int esync_fd; /* esync file descriptor (signalled on exit) */
|
||||
@@ -316,5 +316,5 @@ index 9129e473ba9..10e9e28b432 100644
|
||||
struct msg_queue *queue; /* message queue */
|
||||
struct thread_wait *wait; /* current wait condition if sleeping */
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -0,0 +1,36 @@
|
||||
From 764a3b19afc7519fa9568a402e094a944d56055c Mon Sep 17 00:00:00 2001
|
||||
From: Akihiro Sagawa <sagawa.aki@gmail.com>
|
||||
Date: Sun, 1 Jun 2025 15:42:40 +1000
|
||||
Subject: [PATCH] kernel32: Limit old exe to 3MB available space
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=44931
|
||||
---
|
||||
dlls/kernel32/heap.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
|
||||
index 1ec2f5cce0d..834f4d07e9b 100644
|
||||
--- a/dlls/kernel32/heap.c
|
||||
+++ b/dlls/kernel32/heap.c
|
||||
@@ -475,12 +475,15 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
|
||||
if ( lpBuffer->dwAvailPhys + lpBuffer->dwAvailPageFile >= 2U*1024*1024*1024)
|
||||
lpBuffer->dwAvailPageFile = 2U*1024*1024*1024 - lpBuffer->dwAvailPhys - 1;
|
||||
|
||||
- /* limit page file size for really old binaries */
|
||||
+ /* limit value for really old binaries */
|
||||
+ /* use MAXLONG/2, so that dwAvailPhys + dwAvailPageFile < MAXLONG */
|
||||
if (nt->OptionalHeader.MajorSubsystemVersion < 4 ||
|
||||
nt->OptionalHeader.MajorOperatingSystemVersion < 4)
|
||||
{
|
||||
- if (lpBuffer->dwTotalPageFile > MAXLONG) lpBuffer->dwTotalPageFile = MAXLONG;
|
||||
- if (lpBuffer->dwAvailPageFile > MAXLONG) lpBuffer->dwAvailPageFile = MAXLONG;
|
||||
+ lpBuffer->dwTotalPhys = min(lpBuffer->dwTotalPhys, MAXLONG / 2);
|
||||
+ lpBuffer->dwAvailPhys = min(lpBuffer->dwAvailPhys, MAXLONG / 2);
|
||||
+ lpBuffer->dwTotalPageFile = min(lpBuffer->dwTotalPageFile, MAXLONG / 2);
|
||||
+ lpBuffer->dwAvailPageFile = min(lpBuffer->dwAvailPageFile, MAXLONG / 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
--
|
||||
2.47.2
|
||||
|
1
patches/kernel32-limit_heap_old_exe/definition
Normal file
1
patches/kernel32-limit_heap_old_exe/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [44931] kernel32: Limit old exe to 3MB available space
|
@@ -1,27 +1,28 @@
|
||||
From 1de2ab4f1d48391f112897c2c89d4c1d77d4ac3f Mon Sep 17 00:00:00 2001
|
||||
From 05dfee93e261b38037c370611ab0f63a2785a08c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 27 Feb 2016 00:04:10 +0100
|
||||
Subject: krnl386.exe16: Emulate GDT and LDT access.
|
||||
Subject: [PATCH] krnl386.exe16: Emulate GDT and LDT access.
|
||||
|
||||
---
|
||||
dlls/krnl386.exe16/instr.c | 64 +++++++++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 55 insertions(+), 9 deletions(-)
|
||||
dlls/krnl386.exe16/instr.c | 65 ++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 56 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/krnl386.exe16/instr.c b/dlls/krnl386.exe16/instr.c
|
||||
index b0de30f..865d944 100644
|
||||
index 666ef71363f..c6d05b7a0c9 100644
|
||||
--- a/dlls/krnl386.exe16/instr.c
|
||||
+++ b/dlls/krnl386.exe16/instr.c
|
||||
@@ -67,7 +67,7 @@ static inline void *get_stack( CONTEXT *context )
|
||||
@@ -60,7 +60,8 @@ static inline void *get_stack( CONTEXT *context )
|
||||
}
|
||||
|
||||
#include "pshpack1.h"
|
||||
#pragma pack(push,1)
|
||||
-struct idtr
|
||||
+
|
||||
+struct dtr
|
||||
{
|
||||
WORD limit;
|
||||
BYTE *base;
|
||||
@@ -75,19 +75,41 @@ struct idtr
|
||||
#include "poppack.h"
|
||||
@@ -68,19 +69,41 @@ struct idtr
|
||||
#pragma pack(pop)
|
||||
|
||||
static LDT_ENTRY idt[256];
|
||||
+static LDT_ENTRY gdt[8192];
|
||||
@@ -35,6 +36,18 @@ index b0de30f..865d944 100644
|
||||
+ struct dtr ret;
|
||||
__asm__( "sidtl %0" : "=m" (ret) );
|
||||
+ *offset = data - ret.base;
|
||||
+ return (*offset <= ret.limit + 1 - data_size);
|
||||
+#else
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static BOOL emulate_gdtr( BYTE *data, unsigned int data_size, unsigned int *offset )
|
||||
+{
|
||||
+#if defined(__i386__) && defined(__GNUC__)
|
||||
+ struct dtr ret;
|
||||
+ __asm__( "sgdtl %0" : "=m" (ret) );
|
||||
+ *offset = data - ret.base;
|
||||
+ return (*offset <= ret.limit + 1 - data_size);
|
||||
#else
|
||||
- ret.base = (BYTE *)idt;
|
||||
@@ -44,18 +57,6 @@ index b0de30f..865d944 100644
|
||||
- return ret;
|
||||
}
|
||||
|
||||
+static BOOL emulate_gdtr( BYTE *data, unsigned int data_size, unsigned int *offset )
|
||||
+{
|
||||
+#if defined(__i386__) && defined(__GNUC__)
|
||||
+ struct dtr ret;
|
||||
+ __asm__( "sgdtl %0" : "=m" (ret) );
|
||||
+ *offset = data - ret.base;
|
||||
+ return (*offset <= ret.limit + 1 - data_size);
|
||||
+#else
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static inline WORD get_ldt(void)
|
||||
+{
|
||||
+ WORD seg = 1;
|
||||
@@ -67,7 +68,7 @@ index b0de30f..865d944 100644
|
||||
|
||||
/***********************************************************************
|
||||
* INSTR_ReplaceSelector
|
||||
@@ -711,10 +733,9 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
@@ -705,10 +728,9 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
BYTE *data = INSTR_GetOperandAddr(context, instr + 1, long_addr,
|
||||
segprefix, &len);
|
||||
unsigned int data_size = (*instr == 0x8b) ? (long_op ? 4 : 2) : 1;
|
||||
@@ -80,7 +81,7 @@ index b0de30f..865d944 100644
|
||||
{
|
||||
idt[1].LimitLow = 0x100; /* FIXME */
|
||||
idt[2].LimitLow = 0x11E; /* FIXME */
|
||||
@@ -728,6 +749,31 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
@@ -722,6 +744,31 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
context->Eip += prefixlen + len + 1;
|
||||
return ExceptionContinueExecution;
|
||||
}
|
||||
@@ -113,5 +114,5 @@ index b0de30f..865d944 100644
|
||||
break; /* Unable to emulate it */
|
||||
|
||||
--
|
||||
2.7.1
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8b9d023ce5ef1a063fe1db248255c7d774976890 Mon Sep 17 00:00:00 2001
|
||||
From 74faace74b9343d64ff88b16577773bd08513eca Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 17 Jan 2016 00:50:50 +0100
|
||||
Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
|
||||
@@ -20,10 +20,10 @@ index 3742968c415..084469a2820 100644
|
||||
SOURCES = \
|
||||
atom.c \
|
||||
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
|
||||
index e3f3efa5bfc..1066bfdbdec 100644
|
||||
index f5db5cdc6e2..0bd086c71fb 100644
|
||||
--- a/dlls/ntdll/tests/rtl.c
|
||||
+++ b/dlls/ntdll/tests/rtl.c
|
||||
@@ -38,6 +38,9 @@
|
||||
@@ -39,6 +39,9 @@
|
||||
#include "wine/test.h"
|
||||
#include "wine/asm.h"
|
||||
#include "wine/rbtree.h"
|
||||
@@ -33,7 +33,7 @@ index e3f3efa5bfc..1066bfdbdec 100644
|
||||
|
||||
#ifndef __WINE_WINTERNL_H
|
||||
|
||||
@@ -121,6 +124,9 @@ static void * (WINAPI *pRtlFindExportedRoutineByName)(HMODULE,const char *);
|
||||
@@ -122,6 +125,9 @@ static void * (WINAPI *pRtlFindExportedRoutineByName)(HMODULE,const char *);
|
||||
static void * (WINAPI *pRtlLookupElementGenericTable)(PRTL_GENERIC_TABLE, void *);
|
||||
static ULONG (WINAPI *pRtlNumberGenericTableElements)(PRTL_GENERIC_TABLE);
|
||||
static NTSTATUS (WINAPI *pLdrEnumerateLoadedModules)(void *, void *, void *);
|
||||
@@ -43,7 +43,7 @@ index e3f3efa5bfc..1066bfdbdec 100644
|
||||
static NTSTATUS (WINAPI *pLdrRegisterDllNotification)(ULONG, PLDR_DLL_NOTIFICATION_FUNCTION, void *, void **);
|
||||
static NTSTATUS (WINAPI *pLdrUnregisterDllNotification)(void *);
|
||||
static VOID (WINAPI *pRtlGetDeviceFamilyInfoEnum)(ULONGLONG *,DWORD *,DWORD *);
|
||||
@@ -192,6 +198,9 @@ static void InitFunctionPtrs(void)
|
||||
@@ -194,6 +200,9 @@ static void InitFunctionPtrs(void)
|
||||
pRtlLookupElementGenericTable = (void *)GetProcAddress(hntdll, "RtlLookupElementGenericTable");
|
||||
pRtlNumberGenericTableElements = (void *)GetProcAddress(hntdll, "RtlNumberGenericTableElements");
|
||||
pLdrEnumerateLoadedModules = (void *)GetProcAddress(hntdll, "LdrEnumerateLoadedModules");
|
||||
@@ -52,8 +52,8 @@ index e3f3efa5bfc..1066bfdbdec 100644
|
||||
+ pRtlAbsoluteToSelfRelativeSD = (void *)GetProcAddress(hntdll, "RtlAbsoluteToSelfRelativeSD");
|
||||
pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification");
|
||||
pLdrUnregisterDllNotification = (void *)GetProcAddress(hntdll, "LdrUnregisterDllNotification");
|
||||
pRtlDeriveCapabilitySidsFromName = (void *)GetProcAddress(hntdll, "RtlDeriveCapabilitySidsFromName");
|
||||
@@ -3764,6 +3773,76 @@ static void test_RtlFirstFreeAce(void)
|
||||
pRtlCreateServiceSid = (void *)GetProcAddress(hntdll, "RtlCreateServiceSid");
|
||||
@@ -3767,6 +3776,76 @@ static void test_RtlFirstFreeAce(void)
|
||||
HeapFree(GetProcessHeap(), 0, acl);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ index e3f3efa5bfc..1066bfdbdec 100644
|
||||
static void test_RtlInitializeSid(void)
|
||||
{
|
||||
SID_IDENTIFIER_AUTHORITY sid_ident = { SECURITY_NT_AUTHORITY };
|
||||
@@ -5487,6 +5566,7 @@ START_TEST(rtl)
|
||||
@@ -5515,6 +5594,7 @@ START_TEST(rtl)
|
||||
test_RtlInitializeCriticalSectionEx();
|
||||
test_RtlLeaveCriticalSection();
|
||||
test_LdrEnumerateLoadedModules();
|
||||
|
@@ -64,7 +64,7 @@ index fb5259d8714..93020158d0b 100644
|
||||
+static void sigsys_handler( int signal, siginfo_t *siginfo, void *sigcontext )
|
||||
+{
|
||||
+ extern const void *__wine_syscall_dispatcher_prolog_end_ptr;
|
||||
+ struct syscall_frame *frame = amd64_thread_data()->syscall_frame;
|
||||
+ struct syscall_frame *frame = get_syscall_frame();
|
||||
+ ucontext_t *ctx = sigcontext;
|
||||
+
|
||||
+ TRACE_(seh)("SIGSYS, rax %#llx, rip %#llx.\n", ctx->uc_mcontext.gregs[REG_RAX],
|
||||
@@ -171,7 +171,7 @@ index fb5259d8714..93020158d0b 100644
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
|
||||
+ };
|
||||
+ long (*test_syscall)(long sc_number);
|
||||
+ struct syscall_frame *frame = amd64_thread_data()->syscall_frame;
|
||||
+ struct syscall_frame *frame = get_syscall_frame();
|
||||
+ struct sock_fprog prog;
|
||||
+ NTSTATUS status;
|
||||
+
|
||||
@@ -189,7 +189,7 @@ index fb5259d8714..93020158d0b 100644
|
||||
+
|
||||
+ sigaction(SIGSYS, sig_act, NULL);
|
||||
+
|
||||
+ frame->syscall_flags = syscall_flags;
|
||||
+
|
||||
+
|
||||
+
|
||||
+ test_syscall = mmap((void *)0x600000000000, 0x1000, PROT_EXEC | PROT_READ | PROT_WRITE,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1fbb361023f9474a3522762aae32ad64d056e37e Mon Sep 17 00:00:00 2001
|
||||
From 537fd63e028ce58f4b5dfead7a9fc2a64692fa1e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
|
||||
Date: Fri, 24 May 2019 15:09:35 +0300
|
||||
Subject: [PATCH] ntdll/server: Mark drive_c as case-insensitive when created
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
|
||||
index ab9d99c4f47..f40897757e3 100644
|
||||
index 159b62f268d..66685f4a87b 100644
|
||||
--- a/dlls/ntdll/unix/server.c
|
||||
+++ b/dlls/ntdll/unix/server.c
|
||||
@@ -49,6 +49,10 @@
|
||||
@@ -27,9 +27,9 @@ index ab9d99c4f47..f40897757e3 100644
|
||||
#ifdef HAVE_SYS_PRCTL_H
|
||||
# include <sys/prctl.h>
|
||||
#endif
|
||||
@@ -83,6 +87,22 @@
|
||||
|
||||
@@ -85,6 +89,22 @@
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(server);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(syscall);
|
||||
|
||||
+/* just in case... */
|
||||
+#undef EXT2_IOC_GETFLAGS
|
||||
@@ -50,7 +50,7 @@ index ab9d99c4f47..f40897757e3 100644
|
||||
#ifndef MSG_CMSG_CLOEXEC
|
||||
#define MSG_CMSG_CLOEXEC 0
|
||||
#endif
|
||||
@@ -1137,6 +1157,28 @@ static const char *init_server_dir( dev_t dev, ino_t ino )
|
||||
@@ -1291,6 +1311,28 @@ static const char *init_server_dir( dev_t dev, ino_t ino )
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ index ab9d99c4f47..f40897757e3 100644
|
||||
/***********************************************************************
|
||||
* setup_config_dir
|
||||
*
|
||||
@@ -1173,6 +1215,7 @@ static int setup_config_dir(void)
|
||||
@@ -1327,6 +1369,7 @@ static int setup_config_dir(void)
|
||||
if (!mkdir( "dosdevices", 0777 ))
|
||||
{
|
||||
mkdir( "drive_c", 0777 );
|
||||
@@ -88,5 +88,5 @@ index ab9d99c4f47..f40897757e3 100644
|
||||
symlink( "/", "dosdevices/z:" );
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
From cace313e628d0edd434f6f30c911f7bd91062adb Mon Sep 17 00:00:00 2001
|
||||
From cbca8076ac6f6efe8d6832775b56cdd40fe8108b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:44:43 +1000
|
||||
Subject: [PATCH 07/15] odbc32: Load function pointer for SQLBindParam
|
||||
Subject: [PATCH] odbc32: Load function pointer for SQLBindParam
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index c4e1c046edc..6eb15687f92 100644
|
||||
index d11b4122776..9a079175d42 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -50,6 +50,7 @@ struct win32_funcs
|
||||
@@ -28,5 +28,5 @@ index c4e1c046edc..6eb15687f92 100644
|
||||
LOAD_FUNCPTR( SQLBrowseConnect )
|
||||
LOAD_FUNCPTR( SQLBrowseConnectW )
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,21 +1,23 @@
|
||||
From 1b2068b8f8adc036d0c2b9cda00c37cd55330b41 Mon Sep 17 00:00:00 2001
|
||||
From 1a1b88dd5a0a23c64bf4aee2e64f30c418181be0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:40:32 +1000
|
||||
Subject: [PATCH] odbc32: SQLBindParameter handle fallback function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
dlls/odbc32/proxyodbc.c | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 8f53fa71668..7099027c2b4 100644
|
||||
index 9a079175d42..aa886d01e33 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -5242,6 +5242,29 @@ static SQLRETURN bind_parameter_win32( struct statement *stmt, SQLUSMALLINT para
|
||||
if (stmt->hdr.win32_funcs->SQLBindParameter)
|
||||
return stmt->hdr.win32_funcs->SQLBindParameter( stmt->hdr.win32_handle, param, io_type, value_type,
|
||||
param_type, size, digits, value, buflen, len );
|
||||
+ else if(stmt->hdr.win32_funcs->SQLBindParam)
|
||||
@@ -5524,9 +5524,37 @@ static SQLRETURN bind_parameter_win32( struct statement *stmt, SQLUSMALLINT para
|
||||
SQLSMALLINT value_type, SQLSMALLINT param_type, SQLULEN size,
|
||||
SQLSMALLINT digits, SQLPOINTER value, SQLLEN buflen, SQLLEN *len )
|
||||
{
|
||||
+ struct environment *env = (struct environment *)find_object_type(SQL_HANDLE_ENV, stmt->hdr.parent);
|
||||
+
|
||||
+ if (env && env->attr_version == SQL_OV_ODBC3 && env->driver_ver == SQL_OV_ODBC2)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ /* TODO: Make function */
|
||||
@@ -32,8 +34,14 @@ index 8f53fa71668..7099027c2b4 100644
|
||||
+ else if (param_type == SQL_DATE)
|
||||
+ param_type = SQL_TYPE_DATE;
|
||||
+ else if (param_type == SQL_TIMESTAMP)
|
||||
+ param_type = SQL_TYPE_TIMESTAMP;;;
|
||||
+ param_type = SQL_TYPE_TIMESTAMP;
|
||||
+ }
|
||||
+
|
||||
if (stmt->hdr.win32_funcs->SQLBindParameter)
|
||||
return stmt->hdr.win32_funcs->SQLBindParameter( stmt->hdr.win32_handle, param, io_type, value_type,
|
||||
param_type, size, digits, value, buflen, len );
|
||||
+ else if(stmt->hdr.win32_funcs->SQLBindParam)
|
||||
+ {
|
||||
+ return stmt->hdr.win32_funcs->SQLBindParam( stmt->hdr.win32_handle, param, value_type, param_type,
|
||||
+ size, digits, value, len);
|
||||
+ }
|
||||
@@ -42,5 +50,5 @@ index 8f53fa71668..7099027c2b4 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1b5f6b996f8a1f314e935657f5e205717ace23b4 Mon Sep 17 00:00:00 2001
|
||||
From 987b50c3a705029e222f444caa453729483eac67 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:55:47 +1000
|
||||
Subject: [PATCH] odbc32: SQLSetConnectAttr/W handle fallback function
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] odbc32: SQLSetConnectAttr/W handle fallback function
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 7099027c2b4..632738b9533 100644
|
||||
index aa886d01e33..4fdd242f3b5 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -6334,6 +6334,11 @@ static SQLRETURN set_connect_attr_win32_w( struct connection *con, SQLINTEGER at
|
||||
@@ -6713,6 +6713,11 @@ static SQLRETURN set_connect_attr_win32_w( struct connection *con, SQLINTEGER at
|
||||
if (con->hdr.win32_funcs->SQLSetConnectAttrW)
|
||||
return con->hdr.win32_funcs->SQLSetConnectAttrW( con->hdr.win32_handle, attr, value, len );
|
||||
if (con->hdr.win32_funcs->SQLSetConnectAttr) FIXME( "Unicode to ANSI conversion not handled\n" );
|
||||
@@ -24,5 +24,5 @@ index 7099027c2b4..632738b9533 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 02836ce54a6a32a72cc696f783f6241da23fa385 Mon Sep 17 00:00:00 2001
|
||||
From 7d25d7fa0ee65c209e8c58f6ce276416931d8052 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 18 Jul 2024 07:13:48 +1000
|
||||
Subject: [PATCH] odbc32: Record loaded driver SQL_ATTR_ODBC_VERSION
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] odbc32: Record loaded driver SQL_ATTR_ODBC_VERSION
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index d48c3d822fa..1977e766950 100644
|
||||
index 4fdd242f3b5..c0ab9db9879 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -463,6 +463,7 @@ static struct environment *create_environment( void )
|
||||
@@ -464,6 +464,7 @@ static struct environment *create_environment( void )
|
||||
if (!(ret = calloc( 1, sizeof(*ret) ))) return NULL;
|
||||
init_object( &ret->hdr, SQL_HANDLE_ENV, NULL );
|
||||
ret->attr_version = SQL_OV_ODBC2;
|
||||
@@ -20,7 +20,7 @@ index d48c3d822fa..1977e766950 100644
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1173,6 +1174,9 @@ static SQLRETURN set_env_attr( struct environment *env, SQLINTEGER attr, SQLPOIN
|
||||
@@ -1265,6 +1266,9 @@ static SQLRETURN set_env_attr( struct environment *env, SQLINTEGER attr, SQLPOIN
|
||||
}
|
||||
else if (env->hdr.win32_handle)
|
||||
{
|
||||
@@ -31,10 +31,10 @@ index d48c3d822fa..1977e766950 100644
|
||||
ret = env->hdr.win32_funcs->SQLSetEnvAttr( env->hdr.win32_handle, attr, value, len );
|
||||
}
|
||||
diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h
|
||||
index c771e16f9e3..05ee89c57db 100644
|
||||
index c865a83711d..4ff13a68add 100644
|
||||
--- a/dlls/odbc32/unixlib.h
|
||||
+++ b/dlls/odbc32/unixlib.h
|
||||
@@ -211,6 +211,7 @@ struct environment
|
||||
@@ -205,6 +205,7 @@ struct environment
|
||||
UINT32 sources_idx;
|
||||
void *sources_key;
|
||||
BOOL sources_system;
|
||||
@@ -43,5 +43,5 @@ index c771e16f9e3..05ee89c57db 100644
|
||||
|
||||
struct connection
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2d897946980e67f742b9f39f5f548cf0e2340510 Mon Sep 17 00:00:00 2001
|
||||
From bf0ca6561dde86d00f9362e07c2ceb4fb7001c5f Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2024 21:55:20 +1000
|
||||
Subject: [PATCH] odbc32: SQLGetData support ODBC v2.0
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] odbc32: SQLGetData support ODBC v2.0
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 3b3b198eaa8..c2748cd33d7 100644
|
||||
index c0ab9db9879..64740bd5169 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -2450,11 +2450,35 @@ static SQLRETURN get_data_unix( struct statement *stmt, SQLUSMALLINT column, SQL
|
||||
@@ -2468,11 +2468,35 @@ static SQLRETURN get_data_unix( struct statement *stmt, SQLUSMALLINT column, SQL
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ index 3b3b198eaa8..c2748cd33d7 100644
|
||||
if (stmt->hdr.win32_funcs->SQLGetData)
|
||||
+ {
|
||||
+ struct environment *env = (struct environment *)find_object_type(SQL_HANDLE_ENV, stmt->hdr.parent);
|
||||
+ if (env && env->attr_version == SQL_OV_ODBC2)
|
||||
+ if (env && env->driver_ver == SQL_OV_ODBC2)
|
||||
+ {
|
||||
+ if (type == SQL_C_TYPE_TIME)
|
||||
+ type = SQL_C_TIME;
|
||||
@@ -48,5 +48,5 @@ index 3b3b198eaa8..c2748cd33d7 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
2.47.2
|
||||
|
@@ -1,26 +1,27 @@
|
||||
From 6b7448e5ebdc0b16f3af606a62e2ca465f3ae026 Mon Sep 17 00:00:00 2001
|
||||
From 476b2f23b33d64138ca90073f3d88d91856d3bb1 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2024 22:03:03 +1000
|
||||
Subject: [PATCH] odbc32: SQLColAttributesW support ODBC v2.0
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 19 +++++++++++++++++--
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 71c853013fd..b5c0edb119e 100644
|
||||
index 64740bd5169..742823cf08d 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -6195,6 +6195,8 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
|
||||
@@ -6261,6 +6261,9 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
|
||||
SQLPOINTER char_attr, SQLSMALLINT buflen, SQLSMALLINT *retlen,
|
||||
SQLLEN *num_attr )
|
||||
{
|
||||
+ struct environment *env;
|
||||
+ SQLRETURN ret = SQL_ERROR;
|
||||
+
|
||||
if (stmt->hdr.win32_funcs->SQLColAttributeW)
|
||||
return stmt->hdr.win32_funcs->SQLColAttributeW( stmt->hdr.win32_handle, col, field_id, char_attr, buflen,
|
||||
retlen, num_attr );
|
||||
@@ -6237,11 +6239,23 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
|
||||
@@ -6320,11 +6323,23 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
@@ -28,9 +29,9 @@ index 71c853013fd..b5c0edb119e 100644
|
||||
+ ret = stmt->hdr.win32_funcs->SQLColAttributesW( stmt->hdr.win32_handle, col, field_id, char_attr, buflen,
|
||||
retlen, num_attr );
|
||||
+ /* Convert back for ODBC2 drivers */
|
||||
+ env = (struct environment *)find_object_type(SQL_HANDLE_ENV, stmt->hdr.parent);
|
||||
+ if (SQL_SUCCEEDED(ret) && num_attr && field_id == SQL_COLUMN_TYPE &&
|
||||
+ ((struct environment*)(stmt->hdr.parent))->attr_version == SQL_OV_ODBC2 &&
|
||||
+ ((struct environment*)(stmt->hdr.parent))->driver_ver == SQL_OV_ODBC2)
|
||||
+ env && env->attr_version == SQL_OV_ODBC3 && env->driver_ver == SQL_OV_ODBC2)
|
||||
+ {
|
||||
+ if (*num_attr == SQL_TIME)
|
||||
+ *num_attr = SQL_TYPE_TIME;
|
||||
@@ -47,5 +48,5 @@ index 71c853013fd..b5c0edb119e 100644
|
||||
|
||||
/*************************************************************************
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2003987040ac9ac13d899c299b1375024a18a1dc Mon Sep 17 00:00:00 2001
|
||||
From 2a020e9d35ae25858e0642b06c025dc686594fec Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2024 22:04:39 +1000
|
||||
Subject: [PATCH] odbc32: SQLSetStmtAttrW support fallback for ODBC v2.0
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] odbc32: SQLSetStmtAttrW support fallback for ODBC v2.0
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index f7a6535db37..d0661406fae 100644
|
||||
index 742823cf08d..d0f3a837745 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -7585,6 +7585,11 @@ static SQLRETURN set_stmt_attr_win32_w( struct statement *stmt, SQLINTEGER attr,
|
||||
@@ -7948,6 +7948,11 @@ static SQLRETURN set_stmt_attr_win32_w( struct statement *stmt, SQLINTEGER attr,
|
||||
if (stmt->hdr.win32_funcs->SQLSetStmtAttrW)
|
||||
return stmt->hdr.win32_funcs->SQLSetStmtAttrW( stmt->hdr.win32_handle, attr, value, len );
|
||||
if (stmt->hdr.win32_funcs->SQLSetStmtAttr) FIXME( "Unicode to ANSI conversion not handled\n" );
|
||||
@@ -24,5 +24,5 @@ index f7a6535db37..d0661406fae 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user