winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
895 discussions
Start a n
N
ew thread
Zebediah Figura : http.sys: Allow receiving entity body data.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 92008978498037167e478725934c4c4b12095958 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=92008978498037167e478725…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Nov 3 20:20:37 2019 -0600 http.sys: Allow receiving entity body data. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/http.sys/http.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++--- include/wine/http.h | 7 +++++++ 2 files changed, 60 insertions(+), 3 deletions(-) diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index 41f9f15bba..91d81400e6 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -411,9 +411,9 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) const struct http_receive_request_params params = *(struct http_receive_request_params *)irp->AssociatedIrp.SystemBuffer; DWORD irp_size = (params.bits == 32) ? sizeof(struct http_request_32) : sizeof(struct http_request_64); + ULONG cooked_len, host_len, abs_path_len, query_len, chunk_len = 0, offset, processed; IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); const DWORD output_len = stack->Parameters.DeviceIoControl.OutputBufferLength; - ULONG cooked_len, host_len, abs_path_len, query_len, chunk_len = 0, offset; const char *p, *name, *value, *host, *abs_path, *query; USHORT unk_headers_count = 0, unk_header_idx; int name_len, value_len, len; @@ -758,8 +758,10 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp) assert(offset == irp->IoStatus.Information); conn->available = FALSE; - memmove(conn->buffer, conn->buffer + conn->req_len, conn->len - conn->req_len); - conn->len -= conn->req_len; + processed = conn->req_len - (conn->content_len - chunk_len); + memmove(conn->buffer, conn->buffer + processed, conn->len - processed); + conn->content_len -= chunk_len; + conn->len -= processed; return STATUS_SUCCESS; } @@ -1216,6 +1218,13 @@ static NTSTATUS http_send_response(struct request_queue *queue, IRP *irp) { if (send(conn->socket, response->buffer, response->len, 0) >= 0) { + if (conn->content_len) + { + /* Discard whatever entity body is left. */ + memmove(conn->buffer, conn->buffer + conn->content_len, conn->len - conn->content_len); + conn->len -= conn->content_len; + } + conn->queue = NULL; conn->req_id = HTTP_NULL_ID; WSAEventSelect(conn->socket, request_event, FD_READ | FD_CLOSE); @@ -1242,6 +1251,44 @@ static NTSTATUS http_send_response(struct request_queue *queue, IRP *irp) return STATUS_CONNECTION_INVALID; } +static NTSTATUS http_receive_body(struct request_queue *queue, IRP *irp) +{ + const struct http_receive_body_params *params = irp->AssociatedIrp.SystemBuffer; + IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); + const DWORD output_len = stack->Parameters.DeviceIoControl.OutputBufferLength; + struct connection *conn; + NTSTATUS ret; + + TRACE("id %s, bits %u.\n", wine_dbgstr_longlong(params->id), params->bits); + + EnterCriticalSection(&http_cs); + + if ((conn = get_connection(params->id))) + { + TRACE("%u bits remaining.\n", conn->content_len); + + if (conn->content_len) + { + ULONG len = min(conn->content_len, output_len); + memcpy(irp->AssociatedIrp.SystemBuffer, conn->buffer, len); + memmove(conn->buffer, conn->buffer + len, conn->len - len); + conn->content_len -= len; + conn->len -= len; + + irp->IoStatus.Information = len; + ret = STATUS_SUCCESS; + } + else + ret = STATUS_END_OF_FILE; + } + else + ret = STATUS_CONNECTION_INVALID; + + LeaveCriticalSection(&http_cs); + + return ret; +} + static NTSTATUS WINAPI dispatch_ioctl(DEVICE_OBJECT *device, IRP *irp) { IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); @@ -1262,6 +1309,9 @@ static NTSTATUS WINAPI dispatch_ioctl(DEVICE_OBJECT *device, IRP *irp) case IOCTL_HTTP_SEND_RESPONSE: ret = http_send_response(queue, irp); break; + case IOCTL_HTTP_RECEIVE_BODY: + ret = http_receive_body(queue, irp); + break; default: FIXME("Unhandled ioctl %#x.\n", stack->Parameters.DeviceIoControl.IoControlCode); ret = STATUS_NOT_IMPLEMENTED; diff --git a/include/wine/http.h b/include/wine/http.h index eb75d8f60e..d8039dea07 100644 --- a/include/wine/http.h +++ b/include/wine/http.h @@ -27,6 +27,7 @@ #define IOCTL_HTTP_REMOVE_URL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x801, METHOD_BUFFERED, 0) #define IOCTL_HTTP_RECEIVE_REQUEST CTL_CODE(FILE_DEVICE_UNKNOWN, 0x802, METHOD_BUFFERED, 0) #define IOCTL_HTTP_SEND_RESPONSE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x803, METHOD_BUFFERED, 0) +#define IOCTL_HTTP_RECEIVE_BODY CTL_CODE(FILE_DEVICE_UNKNOWN, 0x804, METHOD_BUFFERED, 0) struct http_add_url_params { @@ -49,4 +50,10 @@ struct http_response char buffer[1]; }; +struct http_receive_body_params +{ + HTTP_REQUEST_ID id; + ULONG bits; +}; + #endif
1
0
0
0
Zebediah Figura : http.sys: Factor out get_connection().
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 6360ea89320927526b6e90b201f96eecde633e60 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6360ea89320927526b6e90b2…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Nov 3 20:20:36 2019 -0600 http.sys: Factor out get_connection(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/http.sys/http.c | 62 ++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index c51ca8a350..41f9f15bba 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -1159,6 +1159,18 @@ static NTSTATUS http_remove_url(struct request_queue *queue, IRP *irp) return STATUS_SUCCESS; } +static struct connection *get_connection(HTTP_REQUEST_ID req_id) +{ + struct connection *conn; + + LIST_FOR_EACH_ENTRY(conn, &connections, struct connection, entry) + { + if (conn->req_id == req_id) + return conn; + } + return NULL; +} + static NTSTATUS http_receive_request(struct request_queue *queue, IRP *irp) { const struct http_receive_request_params *params = irp->AssociatedIrp.SystemBuffer; @@ -1170,14 +1182,11 @@ static NTSTATUS http_receive_request(struct request_queue *queue, IRP *irp) EnterCriticalSection(&http_cs); - LIST_FOR_EACH_ENTRY(conn, &connections, struct connection, entry) + if ((conn = get_connection(params->id)) && conn->available && conn->queue == queue) { - if (conn->available && conn->queue == queue && params->id == conn->req_id) - { - ret = complete_irp(conn, irp); - LeaveCriticalSection(&http_cs); - return ret; - } + ret = complete_irp(conn, irp); + LeaveCriticalSection(&http_cs); + return ret; } if (params->id == HTTP_NULL_ID) @@ -1203,33 +1212,30 @@ static NTSTATUS http_send_response(struct request_queue *queue, IRP *irp) EnterCriticalSection(&http_cs); - LIST_FOR_EACH_ENTRY(conn, &connections, struct connection, entry) + if ((conn = get_connection(response->id))) { - if (conn->req_id == response->id) + if (send(conn->socket, response->buffer, response->len, 0) >= 0) { - if (send(conn->socket, response->buffer, response->len, 0) >= 0) - { - conn->queue = NULL; - conn->req_id = HTTP_NULL_ID; - WSAEventSelect(conn->socket, request_event, FD_READ | FD_CLOSE); - irp->IoStatus.Information = response->len; - /* We might have another request already in the buffer. */ - if (parse_request(conn) < 0) - { - WARN("Failed to parse request; shutting down connection.\n"); - send_400(conn); - close_connection(conn); - } - } - else + conn->queue = NULL; + conn->req_id = HTTP_NULL_ID; + WSAEventSelect(conn->socket, request_event, FD_READ | FD_CLOSE); + irp->IoStatus.Information = response->len; + /* We might have another request already in the buffer. */ + if (parse_request(conn) < 0) { - ERR("Got error %u; shutting down connection.\n", WSAGetLastError()); + WARN("Failed to parse request; shutting down connection.\n"); + send_400(conn); close_connection(conn); } - - LeaveCriticalSection(&http_cs); - return STATUS_SUCCESS; } + else + { + ERR("Got error %u; shutting down connection.\n", WSAGetLastError()); + close_connection(conn); + } + + LeaveCriticalSection(&http_cs); + return STATUS_SUCCESS; } LeaveCriticalSection(&http_cs);
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Pass the correct output size to IoBuildDeviceIoControlRequest().
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 61928e816030413d8d3363dcf9840b302bedfcc6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=61928e816030413d8d3363dc…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Nov 3 20:20:35 2019 -0600 ntoskrnl.exe: Pass the correct output size to IoBuildDeviceIoControlRequest(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 3 --- dlls/ntoskrnl.exe/tests/driver.c | 9 +++------ dlls/ntoskrnl.exe/tests/ntoskrnl.c | 9 ++++++++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 4dd6bb38b3..f53434aedf 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -721,10 +721,7 @@ static NTSTATUS dispatch_ioctl( struct dispatch_context *context ) context->in_buff = out_buff; } else - { out_buff = context->in_buff; - out_size = context->in_size; - } } irp = IoBuildDeviceIoControlRequest( context->params.ioctl.code, device, context->in_buff, diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 0506011ce5..67f22a4b2b 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -1777,17 +1777,14 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st static NTSTATUS test_basic_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) { - ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength; + ULONG length = min(stack->Parameters.DeviceIoControl.OutputBufferLength, sizeof(teststr)); char *buffer = irp->AssociatedIrp.SystemBuffer; if (!buffer) return STATUS_ACCESS_VIOLATION; - if (length < sizeof(teststr)) - return STATUS_BUFFER_TOO_SMALL; - - memcpy(buffer, teststr, sizeof(teststr)); - *info = sizeof(teststr); + memcpy(buffer, teststr, length); + *info = length; return STATUS_SUCCESS; } diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index eb58878cec..76bcf0d0ce 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -190,8 +190,8 @@ static void main_test(void) static void test_basic_ioctl(void) { + char inbuf[64], buf[32]; DWORD written; - char buf[32]; BOOL res; res = DeviceIoControl(device, IOCTL_WINETEST_BASIC_IOCTL, NULL, 0, buf, @@ -199,6 +199,13 @@ static void test_basic_ioctl(void) ok(res, "DeviceIoControl failed: %u\n", GetLastError()); ok(written == sizeof(teststr), "got size %d\n", written); ok(!strcmp(buf, teststr), "got '%s'\n", buf); + + memset(buf, 0, sizeof(buf)); + res = DeviceIoControl(device, IOCTL_WINETEST_BASIC_IOCTL, inbuf, + sizeof(inbuf), buf, 10, &written, NULL); + ok(res, "DeviceIoControl failed: %u\n", GetLastError()); + ok(written == 10, "got size %d\n", written); + ok(!strcmp(buf, "Wine is no"), "got '%s'\n", buf); } static void test_overlapped(void)
1
0
0
0
Sven Baars : shell32: Fix a memory leak (Valgrind).
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 6796cd8ac4a3a03d7af3dd2139c12c53b984a089 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6796cd8ac4a3a03d7af3dd21…
Author: Sven Baars <sven.wine(a)gmail.com> Date: Sat Nov 2 12:02:27 2019 +0100 shell32: Fix a memory leak (Valgrind). Signed-off-by: Sven Baars <sven.wine(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shlview.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index c0c027fbd3..bcb9466315 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -655,6 +655,8 @@ static HRESULT ShellView_FillList(IShellViewImpl *This) { if (IncludeObject(This, pidl) == S_OK) shellview_add_item(This, pidl); + else + ILFree(pidl); } SendMessageW(This->hWndList, LVM_SORTITEMS, (WPARAM)This->pSFParent, (LPARAM)ShellView_CompareItems);
1
0
0
0
Alexandre Julliard : winegcc: Also check magic number to detect shared libraries.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 21c832da633096dfed47c7865c8912420f127ae8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=21c832da633096dfed47c786…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 4 15:54:58 2019 +0100 winegcc: Also check magic number to detect shared libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/utils.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index 3197e46e47..52f46c491b 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -212,6 +212,7 @@ file_type get_file_type(const char* filename) { /* see tools/winebuild/res32.c: check_header for details */ static const char res_sig[] = { 0,0,0,0, 32,0,0,0, 0xff,0xff, 0,0, 0xff,0xff, 0,0, 0,0,0,0, 0,0, 0,0, 0,0,0,0, 0,0,0,0 }; + static const char elf_sig[4] = "\177ELF"; char buf[sizeof(res_sig)]; int fd, cnt; @@ -230,6 +231,11 @@ file_type get_file_type(const char* filename) if (strendswith(filename, ".def")) return file_def; if (strendswith(filename, ".spec")) return file_spec; if (strendswith(filename, ".rc")) return file_rc; + if (cnt >= sizeof(elf_sig) && !memcmp(buf, elf_sig, sizeof(elf_sig))) return file_so; /* ELF lib */ + if (cnt >= sizeof(unsigned int) && + (*(unsigned int *)buf == 0xfeedface || *(unsigned int *)buf == 0xcefaedfe || + *(unsigned int *)buf == 0xfeedfacf || *(unsigned int *)buf == 0xcffaedfe)) + return file_so; /* Mach-O lib */ return file_other; }
1
0
0
0
Alexandre Julliard : vcomp: Fix signed char issues.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 010d44a2ac4a420dc1b3f6e43372bfd067a3db2b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=010d44a2ac4a420dc1b3f6e4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 4 15:14:35 2019 +0100 vcomp: Fix signed char issues. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vcomp/main.c | 12 ++++++------ dlls/vcomp/tests/vcomp.c | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index 686984709a..3c6d48d41c 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -431,10 +431,10 @@ void CDECL _vcomp_atomic_and_i1(char *dest, char val) do old = *dest; while (interlocked_cmpxchg8(dest, old & val, old) != old); } -void CDECL _vcomp_atomic_div_i1(char *dest, char val) +void CDECL _vcomp_atomic_div_i1(signed char *dest, signed char val) { - char old; - do old = *dest; while (interlocked_cmpxchg8(dest, old / val, old) != old); + signed char old; + do old = *dest; while ((signed char)interlocked_cmpxchg8((char *)dest, old / val, old) != old); } void CDECL _vcomp_atomic_div_ui1(unsigned char *dest, unsigned char val) @@ -461,10 +461,10 @@ void CDECL _vcomp_atomic_shl_i1(char *dest, unsigned int val) do old = *dest; while (interlocked_cmpxchg8(dest, old << val, old) != old); } -void CDECL _vcomp_atomic_shr_i1(char *dest, unsigned int val) +void CDECL _vcomp_atomic_shr_i1(signed char *dest, unsigned int val) { - char old; - do old = *dest; while (interlocked_cmpxchg8(dest, old >> val, old) != old); + signed char old; + do old = *dest; while ((signed char)interlocked_cmpxchg8((char *)dest, old >> val, old) != old); } void CDECL _vcomp_atomic_shr_ui1(unsigned char *dest, unsigned int val) diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c index ea62909756..a8b80a0e22 100644 --- a/dlls/vcomp/tests/vcomp.c +++ b/dlls/vcomp/tests/vcomp.c @@ -1549,7 +1549,7 @@ static void test_atomic_integer8(void) struct { void (CDECL *func)(char *, char); - char v1, v2, expected; + signed char v1, v2, expected; } tests1[] = { @@ -1566,9 +1566,9 @@ static void test_atomic_integer8(void) struct { void (CDECL *func)(char *, unsigned int); - char v1; + signed char v1; unsigned int v2; - char expected; + signed char expected; } tests2[] = { @@ -1616,14 +1616,14 @@ static void test_atomic_integer8(void) for (i = 0; i < ARRAY_SIZE(tests1); i++) { - char val = tests1[i].v1; - tests1[i].func(&val, tests1[i].v2); + signed char val = tests1[i].v1; + tests1[i].func((char *)&val, tests1[i].v2); ok(val == tests1[i].expected, "test %d: expected val == %d, got %d\n", i, tests1[i].expected, val); } for (i = 0; i < ARRAY_SIZE(tests2); i++) { - char val = tests2[i].v1; - tests2[i].func(&val, tests2[i].v2); + signed char val = tests2[i].v1; + tests2[i].func((char *)&val, tests2[i].v2); ok(val == tests2[i].expected, "test %d: expected val == %d, got %d\n", i, tests2[i].expected, val); } for (i = 0; i < ARRAY_SIZE(tests3); i++)
1
0
0
0
Alexandre Julliard : vcomp: Fix vcomp_fork() implementation on ARM64.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 15ecb13d9c76a0e9635af6a49ad1412c1a8092be URL:
https://source.winehq.org/git/wine.git/?a=commit;h=15ecb13d9c76a0e9635af6a4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 4 15:14:28 2019 +0100 vcomp: Fix vcomp_fork() implementation on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vcomp/main.c | 52 ++++++++++++++++++---------------------------------- 1 file changed, 18 insertions(+), 34 deletions(-) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index fe87ca06fc..686984709a 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -239,40 +239,24 @@ __ASM_GLOBAL_FUNC( _vcomp_fork_call_wrapper, "stp x29, x30, [SP,#-16]!\n\t" "mov x29, SP\n\t" "mov x9, x0\n\t" - "cbz w1, 2f\n\t" - "mov w10, w1\n\t" - "mov x11, x2\n\t" - "ldr w12, [x11, #24]\n\t" - "ldr x13, [x11, #8]\n\t" - "ldr x0, [x13, w12, sxtw]\n\t" - "add w12, w12, #8\n\t" - "ldr x1, [x13, w12, sxtw]\n\t" - "add w12, w12, #8\n\t" - "ldr x2, [x13, w12, sxtw]\n\t" - "add w12, w12, #8\n\t" - "ldr x3, [x13, w12, sxtw]\n\t" - "add w12, w12, #8\n\t" - "ldr x4, [x13, w12, sxtw]\n\t" - "add w12, w12, #8\n\t" - "ldr x5, [x13, w12, sxtw]\n\t" - "add w12, w12, #8\n\t" - "ldr x6, [x13, w12, sxtw]\n\t" - "add w12, w12, #8\n\t" - "ldr x7, [x13, w12, sxtw]\n\t" - "add w12, w12, #8\n\t" - "add x13, x13, w12, sxtw\n\t" - "subs w12, w10, #8\n\t" - "b.le 2f\n\t" - "ldr x11, [x11]\n\t" - "lsl w12, w12, #3\n\t" - "sub SP, SP, w12, sxtw\n\t" - "tbz w12, #3, 1f\n\t" - "sub SP, SP, #8\n\t" - "1: sub w12, w12, #8\n\t" - "ldr x14, [x13, w12, sxtw]\n\t" - "str x14, [SP, w12, sxtw]\n\t" - "cbnz w12, 1b\n\t" - "2: blr x9\n\t" + "cbz w1, 4f\n\t" + "lsl w8, w1, #3\n\t" + "cmp w8, #64\n\t" + "b.ge 1f\n\t" + "mov w8, #64\n" + "1:\ttbz w8, #3, 2f\n\t" + "add w8, w8, #8\n" + "2:\tsub x10, x29, x8\n\t" + "mov sp, x10\n" + "3:\tldr x0, [x2], #8\n\t" + "str x0, [x10], #8\n\t" + "subs w1, w1, #1\n\t" + "b.ne 3b\n\t" + "ldp x0, x1, [sp], #16\n\t" + "ldp x2, x3, [sp], #16\n\t" + "ldp x4, x5, [sp], #16\n\t" + "ldp x6, x7, [sp], #16\n" + "4:\tblr x9\n\t" "mov SP, x29\n\t" "ldp x29, x30, [SP], #16\n\t" "ret\n" )
1
0
0
0
Fabian Maurer : user32/combo: Properly handle WM_CTLCOLOR* messages.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: fbec0ba9eeb12cc153e1e4e0ca98734fe5bc593a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fbec0ba9eeb12cc153e1e4e0…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Mon Nov 4 10:30:29 2019 +0300 user32/combo: Properly handle WM_CTLCOLOR* messages. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/combo.c | 12 ++++++++++++ dlls/user32/tests/combo.c | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 59c2e6484c..4ddccd6c95 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -1988,6 +1988,18 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar if (GET_WHEEL_DELTA_WPARAM(wParam) < 0) return SendMessageW(hwnd, WM_KEYDOWN, VK_DOWN, 0); return TRUE; + case WM_CTLCOLOR: + case WM_CTLCOLORMSGBOX: + case WM_CTLCOLOREDIT: + case WM_CTLCOLORLISTBOX: + case WM_CTLCOLORBTN: + case WM_CTLCOLORDLG: + case WM_CTLCOLORSCROLLBAR: + case WM_CTLCOLORSTATIC: + if (lphc->owner) + return SendMessageW(lphc->owner, message, wParam, lParam); + break; + /* Combo messages */ case CB_ADDSTRING: diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index 289e1d3f56..6b51ff9719 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -854,7 +854,6 @@ static void test_combo_ctlcolor(void) for (i = 0; i < ARRAY_SIZE(messages); ++i) { brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); - todo_wine ok(brush == brush_red, "%u: unexpected brush %p, expected got %p.\n", i, brush, brush_red); } @@ -865,7 +864,6 @@ static void test_combo_ctlcolor(void) for (i = 0; i < ARRAY_SIZE(messages); ++i) { brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); - todo_wine ok(!brush, "%u: unexpected brush %p.\n", i, brush); }
1
0
0
0
Fabian Maurer : comctl32/combo: Properly handle WM_CTLCOLOR* messages.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 1dc3ec2cdc83da0c1cab96f2dc61b2c917fd1e29 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1dc3ec2cdc83da0c1cab96f2…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Mon Nov 4 10:30:28 2019 +0300 comctl32/combo: Properly handle WM_CTLCOLOR* messages. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46417
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/combo.c | 10 ++++++++++ dlls/comctl32/tests/combo.c | 3 --- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c index 8a52a0bdc0..599817aed4 100644 --- a/dlls/comctl32/combo.c +++ b/dlls/comctl32/combo.c @@ -1963,6 +1963,16 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam if (GET_WHEEL_DELTA_WPARAM(wParam) < 0) return SendMessageW(hwnd, WM_KEYDOWN, VK_DOWN, 0); return TRUE; + case WM_CTLCOLOR: + case WM_CTLCOLORMSGBOX: + case WM_CTLCOLOREDIT: + case WM_CTLCOLORLISTBOX: + case WM_CTLCOLORBTN: + case WM_CTLCOLORDLG: + case WM_CTLCOLORSCROLLBAR: + case WM_CTLCOLORSTATIC: + return SendMessageW(lphc->owner, message, wParam, lParam); + /* Combo messages */ case CB_ADDSTRING: if (lphc->dwStyle & CBS_LOWERCASE) diff --git a/dlls/comctl32/tests/combo.c b/dlls/comctl32/tests/combo.c index be4ee53c22..4757fa3cc6 100644 --- a/dlls/comctl32/tests/combo.c +++ b/dlls/comctl32/tests/combo.c @@ -1306,7 +1306,6 @@ static void test_combo_ctlcolor(void) for (i = 0; i < ARRAY_SIZE(messages); ++i) { brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); - todo_wine ok(brush == brush_red, "%u: unexpected brush %p, expected got %p.\n", i, brush, brush_red); } @@ -1317,7 +1316,6 @@ static void test_combo_ctlcolor(void) for (i = 0; i < ARRAY_SIZE(messages); ++i) { brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); - todo_wine ok(!brush, "%u: unexpected brush %p.\n", i, brush); } @@ -1344,7 +1342,6 @@ static void test_combo_ctlcolor(void) for (i = 0; i < ARRAY_SIZE(messages); ++i) { brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); - todo_wine ok(!brush, "%u: unexpected brush %p.\n", i, brush); }
1
0
0
0
Fabian Maurer : user32/tests: Add combo tests for WM_CTLCOLOR*.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 2feab9b99dbcccc434cc479964bc34ef1fa44f4f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2feab9b99dbcccc434cc4799…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Mon Nov 4 10:30:27 2019 +0300 user32/tests: Add combo tests for WM_CTLCOLOR*. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/combo.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index 0d3b1b170f..289e1d3f56 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -173,6 +173,8 @@ static LRESULT (CALLBACK *old_parent_proc)(HWND hwnd, UINT msg, WPARAM wparam, L static LPCSTR expected_edit_text; static LPCSTR expected_list_text; static BOOL selchange_fired; +static HWND lparam_for_WM_CTLCOLOR; +static HBRUSH brush_red; static LRESULT CALLBACK parent_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { @@ -204,6 +206,20 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPAR break; } break; + case WM_CTLCOLOR: + case WM_CTLCOLORMSGBOX: + case WM_CTLCOLOREDIT: + case WM_CTLCOLORLISTBOX: + case WM_CTLCOLORBTN: + case WM_CTLCOLORDLG: + case WM_CTLCOLORSCROLLBAR: + case WM_CTLCOLORSTATIC: + if (lparam_for_WM_CTLCOLOR) + { + ok(lparam_for_WM_CTLCOLOR == (HWND)lparam, "Expected %p, got %p\n", lparam_for_WM_CTLCOLOR, (HWND)lparam); + return (LRESULT) brush_red; + } + break; } return CallWindowProcA(old_parent_proc, hwnd, msg, wparam, lparam); @@ -804,8 +820,89 @@ static void test_WS_VSCROLL(void) DestroyWindow(hCombo); } +static void test_combo_ctlcolor(void) +{ + static const int messages[] = + { + WM_CTLCOLOR, + WM_CTLCOLORMSGBOX, + WM_CTLCOLOREDIT, + WM_CTLCOLORLISTBOX, + WM_CTLCOLORBTN, + WM_CTLCOLORDLG, + WM_CTLCOLORSCROLLBAR, + WM_CTLCOLORSTATIC, + }; + + HBRUSH brush, global_brush; + unsigned int i, ret; + COMBOBOXINFO info; + HWND combo; + + combo = build_combo(CBS_DROPDOWN); + ok(!!combo, "Failed to create combo window.\n"); + + old_parent_proc = (void *)SetWindowLongPtrA(hMainWnd, GWLP_WNDPROC, (ULONG_PTR)parent_wnd_proc); + + info.cbSize = sizeof(COMBOBOXINFO); + ret = GetComboBoxInfo(combo, &info); + ok(ret, "Failed to get combobox info structure.\n"); + + lparam_for_WM_CTLCOLOR = info.hwndItem; + + /* Parent returns valid brush handle. */ + for (i = 0; i < ARRAY_SIZE(messages); ++i) + { + brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); + todo_wine + ok(brush == brush_red, "%u: unexpected brush %p, expected got %p.\n", i, brush, brush_red); + } + + /* Parent returns NULL brush. */ + global_brush = brush_red; + brush_red = NULL; + + for (i = 0; i < ARRAY_SIZE(messages); ++i) + { + brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); + todo_wine + ok(!brush, "%u: unexpected brush %p.\n", i, brush); + } + + brush_red = global_brush; + + lparam_for_WM_CTLCOLOR = 0; + + /* Parent does default processing. */ + for (i = 0; i < ARRAY_SIZE(messages); ++i) + { + brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); + ok(!!brush && brush != brush_red, "%u: unexpected brush %p.\n", i, brush); + } + + SetWindowLongPtrA(hMainWnd, GWLP_WNDPROC, (ULONG_PTR)old_parent_proc); + DestroyWindow(combo); + + /* Combo without a parent. */ + combo = CreateWindowA("ComboBox", "Combo", CBS_DROPDOWN, 5, 5, 100, 100, NULL, NULL, NULL, 0); + ok(!!combo, "Failed to create combo window.\n"); + + info.cbSize = sizeof(COMBOBOXINFO); + ret = GetComboBoxInfo(combo, &info); + ok(ret, "Failed to get combobox info structure.\n"); + + for (i = 0; i < ARRAY_SIZE(messages); ++i) + { + brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem); + ok(!!brush && brush != brush_red, "%u: unexpected brush %p.\n", i, brush); + } + + DestroyWindow(combo); +} + START_TEST(combo) { + brush_red = CreateSolidBrush(RGB(255, 0, 0)); hMainWnd = CreateWindowA("static", "Test", WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, NULL, NULL, NULL, 0); ShowWindow(hMainWnd, SW_SHOW); @@ -825,6 +922,8 @@ START_TEST(combo) test_listbox_styles(CBS_DROPDOWN); test_listbox_styles(CBS_DROPDOWNLIST); test_listbox_size(CBS_DROPDOWN); + test_combo_ctlcolor(); DestroyWindow(hMainWnd); + DeleteObject(brush_red); }
1
0
0
0
← Newer
1
...
81
82
83
84
85
86
87
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200