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
January 2022
----- 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
2 participants
726 discussions
Start a n
N
ew thread
Paul Gofman : winhttp: Use a buffer for sending frame in send_frame().
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 70ada6d1890bc8e6d3cdb6d2c8fa475cf0de04c6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=70ada6d1890bc8e6d3cdb6d2…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Thu Jan 20 18:35:32 2022 +0300 winhttp: Use a buffer for sending frame in send_frame(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 58 ++++++++++++++++++++++++++++++++---------- dlls/winhttp/winhttp_private.h | 4 +++ 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index d76edfa71d7..907ee538f54 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3063,6 +3063,7 @@ static void socket_destroy( struct object_header *hdr ) stop_queue( &socket->recv_q ); release_object( &socket->request->hdr ); + free( socket->send_frame_buffer ); free( socket ); } @@ -3142,10 +3143,12 @@ static DWORD send_bytes( struct socket *socket, char *bytes, int len ) static DWORD send_frame( struct socket *socket, enum socket_opcode opcode, USHORT status, const char *buf, DWORD buflen, BOOL final ) { - DWORD i = 0, j, ret, offset = 2, len = buflen; - char hdr[14], byte, *mask = NULL; + DWORD i = 0, j, offset = 2, len = buflen; + DWORD buffer_size, ret = 0, send_size; + char hdr[14], *mask = NULL; + char *ptr; - TRACE("sending %02x frame\n", opcode); + TRACE( "sending %02x frame, len %u.\n", opcode, len ); if (opcode == SOCKET_OPCODE_CLOSE) len += sizeof(status); @@ -3171,29 +3174,56 @@ static DWORD send_frame( struct socket *socket, enum socket_opcode opcode, USHOR offset += 8; } - if ((ret = send_bytes( socket, hdr, offset ))) return ret; + buffer_size = len + offset; + if (len) buffer_size += 4; + assert( buffer_size - len < MAX_FRAME_BUFFER_SIZE ); + if (buffer_size > socket->send_frame_buffer_size && socket->send_frame_buffer_size < MAX_FRAME_BUFFER_SIZE) + { + DWORD new_size; + void *new; + + new_size = min( buffer_size, MAX_FRAME_BUFFER_SIZE ); + if (!(new = realloc( socket->send_frame_buffer, new_size ))) + { + ERR("Out of memory, buffer_size %u.\n", buffer_size); + return ERROR_OUTOFMEMORY; + } + socket->send_frame_buffer = new; + socket->send_frame_buffer_size = new_size; + } + ptr = socket->send_frame_buffer; + + memcpy(ptr, hdr, offset); + ptr += offset; if (len) { mask = &hdr[offset]; RtlGenRandom( mask, 4 ); - if ((ret = send_bytes( socket, mask, 4 ))) return ret; + memcpy( ptr, mask, 4 ); + ptr += 4; } if (opcode == SOCKET_OPCODE_CLOSE) /* prepend status code */ { - byte = (status >> 8) ^ mask[i++ % 4]; - if ((ret = send_bytes( socket, &byte, 1 ))) return ret; - - byte = (status & 0xff) ^ mask[i++ % 4]; - if ((ret = send_bytes( socket, &byte, 1 ))) return ret; + *ptr++ = (status >> 8) ^ mask[i++ % 4]; + *ptr++ = (status & 0xff) ^ mask[i++ % 4]; } - for (j = 0; j < buflen; j++) + offset = ptr - socket->send_frame_buffer; + send_size = offset + buflen; + while (1) { - byte = buf[j] ^ mask[i++ % 4]; - if ((ret = send_bytes( socket, &byte, 1 ))) return ret; - } + j = 0; + while (j < buflen && offset < MAX_FRAME_BUFFER_SIZE) + socket->send_frame_buffer[offset++] = buf[j++] ^ mask[i++ % 4]; + + if ((ret = send_bytes( socket, socket->send_frame_buffer, offset ))) return ret; + if (!(send_size -= offset)) break; + offset = 0; + buf += j; + buflen -= j; + } return ERROR_SUCCESS; } diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 1538a61da6d..557ee766735 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -248,6 +248,8 @@ struct socket USHORT status; char reason[123]; DWORD reason_len; + char *send_frame_buffer; + unsigned int send_frame_buffer_size; }; struct send_request @@ -398,4 +400,6 @@ static inline char *strdupWA_sized( const WCHAR *src, DWORD size ) extern HINSTANCE winhttp_instance DECLSPEC_HIDDEN; +#define MAX_FRAME_BUFFER_SIZE 65536 + #endif /* _WINE_WINHTTP_PRIVATE_H_ */
1
0
0
0
Paul Gofman : winhttp: Use separate SSL read and write buffers.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 25bd67465d388c301188e0845534447b850d1f08 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=25bd67465d388c301188e084…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Thu Jan 20 18:35:31 2022 +0300 winhttp: Use separate SSL read and write buffers. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/net.c | 34 +++++++++++++++++++++------------- dlls/winhttp/winhttp_private.h | 2 +- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index 3016608404a..68aee036734 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -250,7 +250,8 @@ void netconn_close( struct netconn *conn ) if (conn->secure) { free( conn->peek_msg_mem ); - free(conn->ssl_buf); + free(conn->ssl_read_buf); + free(conn->ssl_write_buf); free(conn->extra_buf); DeleteSecurityContext(&conn->ssl_ctx); } @@ -365,8 +366,13 @@ DWORD netconn_secure_connect( struct netconn *conn, WCHAR *hostname, DWORD secur break; } - conn->ssl_buf = malloc(conn->ssl_sizes.cbHeader + conn->ssl_sizes.cbMaximumMessage + conn->ssl_sizes.cbTrailer); - if(!conn->ssl_buf) { + conn->ssl_read_buf = malloc(conn->ssl_sizes.cbHeader + conn->ssl_sizes.cbMaximumMessage + conn->ssl_sizes.cbTrailer); + if(!conn->ssl_read_buf) { + res = ERROR_OUTOFMEMORY; + break; + } + conn->ssl_write_buf = malloc(conn->ssl_sizes.cbHeader + conn->ssl_sizes.cbMaximumMessage + conn->ssl_sizes.cbTrailer); + if(!conn->ssl_write_buf) { res = ERROR_OUTOFMEMORY; break; } @@ -377,8 +383,10 @@ DWORD netconn_secure_connect( struct netconn *conn, WCHAR *hostname, DWORD secur if(status != SEC_E_OK || res != ERROR_SUCCESS) { WARN("Failed to initialize security context: %08x\n", status); - free(conn->ssl_buf); - conn->ssl_buf = NULL; + free(conn->ssl_read_buf); + conn->ssl_read_buf = NULL; + free(conn->ssl_write_buf); + conn->ssl_write_buf = NULL; DeleteSecurityContext(&ctx); return ERROR_WINHTTP_SECURE_CHANNEL_ERROR; } @@ -393,9 +401,9 @@ DWORD netconn_secure_connect( struct netconn *conn, WCHAR *hostname, DWORD secur static DWORD send_ssl_chunk( struct netconn *conn, const void *msg, size_t size ) { SecBuffer bufs[4] = { - {conn->ssl_sizes.cbHeader, SECBUFFER_STREAM_HEADER, conn->ssl_buf}, - {size, SECBUFFER_DATA, conn->ssl_buf+conn->ssl_sizes.cbHeader}, - {conn->ssl_sizes.cbTrailer, SECBUFFER_STREAM_TRAILER, conn->ssl_buf+conn->ssl_sizes.cbHeader+size}, + {conn->ssl_sizes.cbHeader, SECBUFFER_STREAM_HEADER, conn->ssl_write_buf}, + {size, SECBUFFER_DATA, conn->ssl_write_buf+conn->ssl_sizes.cbHeader}, + {conn->ssl_sizes.cbTrailer, SECBUFFER_STREAM_TRAILER, conn->ssl_write_buf+conn->ssl_sizes.cbHeader+size}, {0, SECBUFFER_EMPTY, NULL} }; SecBufferDesc buf_desc = {SECBUFFER_VERSION, ARRAY_SIZE(bufs), bufs}; @@ -408,7 +416,7 @@ static DWORD send_ssl_chunk( struct netconn *conn, const void *msg, size_t size return res; } - if (sock_send( conn->socket, conn->ssl_buf, bufs[0].cbBuffer + bufs[1].cbBuffer + bufs[2].cbBuffer, 0 ) < 1) + if (sock_send( conn->socket, conn->ssl_write_buf, bufs[0].cbBuffer + bufs[1].cbBuffer + bufs[2].cbBuffer, 0 ) < 1) { WARN("send failed\n"); return WSAGetLastError(); @@ -456,13 +464,13 @@ static DWORD read_ssl_chunk( struct netconn *conn, void *buf, SIZE_T buf_size, S assert(conn->extra_len < ssl_buf_size); if(conn->extra_len) { - memcpy(conn->ssl_buf, conn->extra_buf, conn->extra_len); + memcpy(conn->ssl_read_buf, conn->extra_buf, conn->extra_len); buf_len = conn->extra_len; conn->extra_len = 0; free(conn->extra_buf); conn->extra_buf = NULL; }else { - if ((buf_len = sock_recv( conn->socket, conn->ssl_buf + conn->extra_len, ssl_buf_size - conn->extra_len, 0)) < 0) + if ((buf_len = sock_recv( conn->socket, conn->ssl_read_buf + conn->extra_len, ssl_buf_size - conn->extra_len, 0)) < 0) return WSAGetLastError(); if (!buf_len) @@ -479,7 +487,7 @@ static DWORD read_ssl_chunk( struct netconn *conn, void *buf, SIZE_T buf_size, S memset(bufs, 0, sizeof(bufs)); bufs[0].BufferType = SECBUFFER_DATA; bufs[0].cbBuffer = buf_len; - bufs[0].pvBuffer = conn->ssl_buf; + bufs[0].pvBuffer = conn->ssl_read_buf; switch ((res = DecryptMessage( &conn->ssl_ctx, &buf_desc, 0, NULL ))) { @@ -498,7 +506,7 @@ static DWORD read_ssl_chunk( struct netconn *conn, void *buf, SIZE_T buf_size, S case SEC_E_INCOMPLETE_MESSAGE: assert(buf_len < ssl_buf_size); - if ((size = sock_recv( conn->socket, conn->ssl_buf + buf_len, ssl_buf_size - buf_len, 0 )) < 1) + if ((size = sock_recv( conn->socket, conn->ssl_read_buf + buf_len, ssl_buf_size - buf_len, 0 )) < 1) return SEC_E_INCOMPLETE_MESSAGE; buf_len += size; diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 291a38e7bdd..1538a61da6d 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -108,7 +108,7 @@ struct netconn ULONGLONG keep_until; CtxtHandle ssl_ctx; SecPkgContext_StreamSizes ssl_sizes; - char *ssl_buf; + char *ssl_read_buf, *ssl_write_buf; char *extra_buf; size_t extra_len; char *peek_msg;
1
0
0
0
Paul Gofman : winhttp/tests: Also test async websockets with secure connection.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 76ac0f3406155bb6527ea08951885c887e0b1c69 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=76ac0f3406155bb6527ea089…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Thu Jan 20 18:35:30 2022 +0300 winhttp/tests: Also test async websockets with secure connection. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/tests/notification.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c index 72cef89a618..ce585087370 100644 --- a/dlls/winhttp/tests/notification.c +++ b/dlls/winhttp/tests/notification.c @@ -671,7 +671,7 @@ static const struct notification websocket_test[] = { winhttp_close_handle, WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING, NF_SIGNAL } }; -static void test_websocket(void) +static void test_websocket(BOOL secure) { HANDLE session, connection, request, socket, event; WINHTTP_WEB_SOCKET_BUFFER_TYPE type; @@ -680,6 +680,7 @@ static void test_websocket(void) struct info info, *context = &info; char buffer[1024]; USHORT close_status; + DWORD protocols, flags; if (!pWinHttpWebSocketCompleteUpgrade) { @@ -703,6 +704,13 @@ static void test_websocket(void) unload = FALSE; } + if (secure) + { + protocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2; + ret = WinHttpSetOption(session, WINHTTP_OPTION_SECURE_PROTOCOLS, &protocols, sizeof(protocols)); + ok(ret, "failed to set protocols %u\n", GetLastError()); + } + SetLastError( 0xdeadbeef ); WinHttpSetStatusCallback( session, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 ); err = GetLastError(); @@ -723,11 +731,19 @@ static void test_websocket(void) setup_test( &info, winhttp_open_request, __LINE__ ); SetLastError( 0xdeadbeef ); - request = WinHttpOpenRequest( connection, NULL, L"/", NULL, NULL, NULL, 0 ); + request = WinHttpOpenRequest( connection, NULL, L"/", NULL, NULL, NULL, secure ? WINHTTP_FLAG_SECURE : 0); err = GetLastError(); ok( request != NULL, "got %u\n", err ); ok( err == ERROR_SUCCESS, "got %u\n", err ); + if (secure) + { + flags = SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_DATE_INVALID | + SECURITY_FLAG_IGNORE_CERT_CN_INVALID; + ret = WinHttpSetOption(request, WINHTTP_OPTION_SECURITY_FLAGS, &flags, sizeof(flags)); + ok(ret, "failed to set security flags %u\n", GetLastError()); + } + ret = WinHttpSetOption( request, WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET, NULL, 0 ); ok( ret, "got %u\n", GetLastError() ); @@ -1380,7 +1396,10 @@ START_TEST (notification) test_connection_cache(); test_redirect(); test_async(); - test_websocket(); + test_websocket( FALSE ); + winetest_push_context( "secure" ); + test_websocket( TRUE ); + winetest_pop_context(); test_recursion(); si.event = CreateEventW( NULL, 0, 0, NULL );
1
0
0
0
Alexandre Julliard : makefiles: Specify the bison prefix directly in the source files.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: f4af3134dec425706b74428317e9ab327b6061cc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f4af3134dec425706b744283…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 21 12:50:25 2022 +0100 makefiles: Specify the bison prefix directly in the source files. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/asmshader.y | 2 ++ dlls/d3dcompiler_43/ppl.l | 4 ++-- dlls/d3dcompiler_43/ppy.y | 2 ++ dlls/jscript/cc_parser.y | 1 + dlls/jscript/parser.y | 3 ++- dlls/msi/cond.y | 5 +++-- dlls/msi/sql.y | 1 + dlls/msxml3/xslpattern.h | 2 +- dlls/msxml3/xslpattern.l | 1 + dlls/msxml3/xslpattern.y | 1 + dlls/vbscript/parser.y | 3 ++- dlls/wbemprox/wql.y | 1 + programs/winedbg/dbg.y | 2 ++ tools/makedep.c | 6 +++--- tools/widl/parser.y | 5 ++++- tools/wmc/mcy.y | 2 ++ tools/wrc/parser.y | 9 ++++++--- tools/wrc/ppl.l | 4 ++-- tools/wrc/ppy.y | 2 ++ 19 files changed, 40 insertions(+), 16 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f4af3134dec425706b74…
1
0
0
0
Alexandre Julliard : makefiles: Add a maintainer-clean target.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 363d078f46d87696ed6024bc8e2c22f457623771 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=363d078f46d87696ed6024bc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 21 11:48:20 2022 +0100 makefiles: Add a maintainer-clean target. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 4 +++- configure.ac | 4 +++- tools/makedep.c | 19 ++++++++++++++----- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 9a7a24b1f69..b6d22f896ea 100755 --- a/configure +++ b/configure @@ -22832,7 +22832,9 @@ fi wine_fn_append_rule "distclean:: clean - rm -rf autom4te.cache" + rm -rf autom4te.cache +maintainer-clean:: + rm -f configure include/config.h.in" wine_fn_append_rule "dlls/ntdll/unix/version.c: dummy diff --git a/configure.ac b/configure.ac index 275fba3771c..0b1a53f3ff9 100644 --- a/configure.ac +++ b/configure.ac @@ -3796,7 +3796,9 @@ dnl Rules for cleaning WINE_APPEND_RULE( [distclean:: clean - rm -rf autom4te.cache]) + rm -rf autom4te.cache +maintainer-clean:: + rm -f configure include/config.h.in]) dnl Rules for generated source files diff --git a/tools/makedep.c b/tools/makedep.c index 03181c7d60b..5a286c3c343 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -208,6 +208,7 @@ struct makefile struct strarray test_files; struct strarray clean_files; struct strarray distclean_files; + struct strarray maintainerclean_files; struct strarray uninstall_files; struct strarray object_files; struct strarray crossobj_files; @@ -2583,7 +2584,7 @@ static void output_uninstall_rules( struct makefile *make ) /******************************************************************* * output_po_files */ -static void output_po_files( const struct makefile *make ) +static void output_po_files( struct makefile *make ) { const char *po_dir = src_dir_path( make, "po" ); unsigned int i; @@ -2595,7 +2596,7 @@ static void output_po_files( const struct makefile *make ) output( ": %s/wine.pot\n", po_dir ); output( "\t%smsgmerge --previous -q $@ %s/wine.pot | msgattrib --no-obsolete -o $@.new && mv $@.new $@\n", cmd_prefix( "MSG" ), po_dir ); - output( "po:" ); + output( "po/all:" ); for (i = 0; i < linguas.count; i++) output_filename( strmake( "%s/%s.po", po_dir, linguas.str[i] )); output( "\n" ); @@ -2606,6 +2607,7 @@ static void output_po_files( const struct makefile *make ) output( "\t%smsgcat -o $@", cmd_prefix( "MSG" )); output_filenames( make->pot_files ); output( "\n" ); + strarray_add( &make->maintainerclean_files, strmake( "%s/wine.pot", po_dir )); } @@ -2817,6 +2819,7 @@ static void output_source_sfd( struct makefile *make, struct incl_file *source, output( "\t%s%s -script %s %s $@\n", cmd_prefix( "GEN" ), fontforge, root_src_dir_path( "fonts/genttf.ff" ), source->filename ); if (!(source->file->flags & FLAG_SFD_FONTS)) strarray_add( &make->font_files, ttf_obj ); + strarray_add( &make->maintainerclean_files, ttf_obj ); } if (source->file->flags & FLAG_INSTALL) { @@ -2852,7 +2855,7 @@ static void output_source_svg( struct makefile *make, struct incl_file *source, static const char * const images[] = { "bmp", "cur", "ico", NULL }; unsigned int i; - if (convert && rsvg && icotool && !make->src_dir) + if (convert && rsvg && icotool) { for (i = 0; images[i]; i++) if (find_include_file( make, strmake( "%s.%s", obj, images[i] ))) break; @@ -2863,6 +2866,7 @@ static void output_source_svg( struct makefile *make, struct incl_file *source, output( "\t%sCONVERT=\"%s\" ICOTOOL=\"%s\" RSVG=\"%s\" %s %s $@\n", cmd_prefix( "GEN" ), convert, icotool, rsvg, root_src_dir_path( "tools/buildimage" ), source->filename ); + strarray_add( &make->maintainerclean_files, strmake( "%s.%s", obj, images[i] )); } } } @@ -3566,12 +3570,14 @@ static void output_subdirs( struct makefile *make ) strarray_addall_uniq( &dependencies, submakes[i]->dependencies ); strarray_addall_path( &clean_files, submakes[i]->obj_dir, submakes[i]->clean_files ); strarray_addall_path( &distclean_files, submakes[i]->obj_dir, submakes[i]->distclean_files ); + strarray_addall_path( &make->maintainerclean_files, submakes[i]->obj_dir, submakes[i]->maintainerclean_files ); strarray_addall_path( &testclean_files, submakes[i]->obj_dir, submakes[i]->ok_files ); strarray_addall_path( &make->pot_files, submakes[i]->obj_dir, submakes[i]->pot_files ); if (submakes[i]->disabled) continue; strarray_addall_path( &all_targets, submakes[i]->obj_dir, submakes[i]->all_targets ); + strarray_addall_path( &all_targets, submakes[i]->obj_dir, submakes[i]->font_files ); if (!strcmp( submakes[i]->obj_dir, "tools" ) || !strncmp( submakes[i]->obj_dir, "tools/", 6 )) strarray_add( &tooldeps_deps, obj_dir_path( submakes[i], "all" )); if (submakes[i]->testdll) @@ -3620,14 +3626,19 @@ static void output_subdirs( struct makefile *make ) strarray_add_uniq( &make->phony_targets, "check" ); strarray_add_uniq( &make->phony_targets, "test" ); + if (get_expanded_make_variable( make, "GETTEXTPO_LIBS" )) output_po_files( make ); + output( "clean::\n"); output_rm_filenames( clean_files ); output( "testclean::\n"); output_rm_filenames( testclean_files ); output( "distclean::\n"); output_rm_filenames( distclean_files ); + output( "maintainer-clean::\n"); + output_rm_filenames( make->maintainerclean_files ); strarray_add_uniq( &make->phony_targets, "distclean" ); strarray_add_uniq( &make->phony_targets, "testclean" ); + strarray_add_uniq( &make->phony_targets, "maintainer-clean" ); if (tooldeps_deps.count) { @@ -3637,8 +3648,6 @@ static void output_subdirs( struct makefile *make ) strarray_add_uniq( &make->phony_targets, "__tooldeps__" ); } - if (get_expanded_make_variable( make, "GETTEXTPO_LIBS" )) output_po_files( make ); - if (make->phony_targets.count) { output( ".PHONY:" );
1
0
0
0
Alexandre Julliard : makefiles: Add dependencies for files generated in maintainer mode.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 3c0a2fa5a6e9eaef5aebbbd0080cf7f478a49864 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c0a2fa5a6e9eaef5aebbbd0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 21 09:50:45 2022 +0100 makefiles: Add dependencies for files generated in maintainer mode. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/makedep.c b/tools/makedep.c index e7a71cb85d2..03181c7d60b 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1386,6 +1386,13 @@ static struct file *open_include_file( const struct makefile *make, struct incl_ /* check for generated files */ if ((file = open_local_generated_file( make, pFile, ".tab.h", ".y" ))) return file; if ((file = open_local_generated_file( make, pFile, ".h", ".idl" ))) return file; + if (fontforge && (file = open_local_generated_file( make, pFile, ".ttf", ".sfd" ))) return file; + if (convert && rsvg && icotool) + { + if ((file = open_local_generated_file( make, pFile, ".bmp", ".svg" ))) return file; + if ((file = open_local_generated_file( make, pFile, ".cur", ".svg" ))) return file; + if ((file = open_local_generated_file( make, pFile, ".ico", ".svg" ))) return file; + } /* check for extra targets */ if (strarray_exists( &make->extra_targets, pFile->name ))
1
0
0
0
Alexandre Julliard : makefiles: Compare the full path when looking for generated include files.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 4c7a2b4cbbba5a76008d4c836f601d7da3642110 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4c7a2b4cbbba5a76008d4c83…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 21 09:50:12 2022 +0100 makefiles: Compare the full path when looking for generated include files. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/makedep.c b/tools/makedep.c index 04cb14504b5..e7a71cb85d2 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -756,7 +756,16 @@ static struct incl_file *find_include_file( const struct makefile *make, const c struct incl_file *file; LIST_FOR_EACH_ENTRY( file, &make->includes, struct incl_file, entry ) - if (!strcmp( name, file->name )) return file; + { + const char *filename = file->filename; + if (!filename) continue; + if (make->obj_dir && strlen(make->obj_dir) < strlen(filename)) + { + filename += strlen(make->obj_dir); + while (*filename == '/') filename++; + } + if (!strcmp( name, filename )) return file; + } return NULL; }
1
0
0
0
Alexandre Julliard : makefiles: Also look for generated includes in the source file directory.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 5d4ca2225e8edecbaab25545d6a08d40e54cfca9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5d4ca2225e8edecbaab25545…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 21 09:49:19 2022 +0100 makefiles: Also look for generated includes in the source file directory. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tools/makedep.c b/tools/makedep.c index a4557785f3a..04cb14504b5 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1203,6 +1203,28 @@ static struct file *open_file_same_dir( const struct incl_file *parent, const ch } +/******************************************************************* + * open_same_dir_generated_file + * + * Open a generated_file in the same directory as the parent. + */ +static struct file *open_same_dir_generated_file( const struct makefile *make, + const struct incl_file *parent, struct incl_file *file, + const char *ext, const char *src_ext ) +{ + char *filename; + struct file *ret = NULL; + + if (strendswith( file->name, ext ) && + (ret = open_file_same_dir( parent, replace_extension( file->name, ext, src_ext ), &filename ))) + { + file->sourcename = filename; + file->filename = obj_dir_path( make, replace_filename( parent->name, file->name )); + } + return ret; +} + + /******************************************************************* * open_local_file * @@ -1426,7 +1448,9 @@ static struct file *open_include_file( const struct makefile *make, struct incl_ if (pFile->type == INCL_SYSTEM) return NULL; /* ignore system files we cannot find */ /* try in src file directory */ - if ((file = open_file_same_dir( pFile->included_by, pFile->name, &pFile->filename ))) + if ((file = open_same_dir_generated_file( make, pFile->included_by, pFile, ".tab.h", ".y" )) || + (file = open_same_dir_generated_file( make, pFile->included_by, pFile, ".h", ".idl" )) || + (file = open_file_same_dir( pFile->included_by, pFile->name, &pFile->filename ))) { pFile->is_external = pFile->included_by->is_external; return file;
1
0
0
0
Alexandre Julliard : makefiles: Add helper functions to open generated include files.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 9da1813651fb1b4061104fb0bd0eabff517a703f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9da1813651fb1b4061104fb0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 21 09:49:00 2022 +0100 makefiles: Add helper functions to open generated include files. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 99 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 50 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index ff89bae3ccf..a4557785f3a 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1227,6 +1227,27 @@ static struct file *open_local_file( const struct makefile *make, const char *pa } +/******************************************************************* + * open_local_generated_file + * + * Open a generated file in the directory of the makefile. + */ +static struct file *open_local_generated_file( const struct makefile *make, struct incl_file *file, + const char *ext, const char *src_ext ) +{ + char *filename; + struct file *ret = NULL; + + if (strendswith( file->name, ext ) && + (ret = open_local_file( make, replace_extension( file->name, ext, src_ext ), &filename ))) + { + file->sourcename = filename; + file->filename = obj_dir_path( make, file->name ); + } + return ret; +} + + /******************************************************************* * open_global_file * @@ -1254,6 +1275,27 @@ static struct file *open_global_header( const struct makefile *make, const char } +/******************************************************************* + * open_global_generated_file + * + * Open a generated file in the top-level source directory. + */ +static struct file *open_global_generated_file( const struct makefile *make, struct incl_file *file, + const char *ext, const char *src_ext ) +{ + char *filename; + struct file *ret = NULL; + + if (strendswith( file->name, ext ) && + (ret = open_global_header( make, replace_extension( file->name, ext, src_ext ), &filename ))) + { + file->sourcename = filename; + file->filename = strmake( "include/%s", file->name ); + } + return ret; +} + + /******************************************************************* * open_src_file */ @@ -1306,30 +1348,13 @@ static int has_external_import( const struct makefile *make ) static struct file *open_include_file( const struct makefile *make, struct incl_file *pFile ) { struct file *file = NULL; - char *filename; unsigned int i, len; errno = ENOENT; - /* check for generated bison header */ - - if (strendswith( pFile->name, ".tab.h" ) && - (file = open_local_file( make, replace_extension( pFile->name, ".tab.h", ".y" ), &filename ))) - { - pFile->sourcename = filename; - pFile->filename = obj_dir_path( make, pFile->name ); - return file; - } - - /* check for corresponding idl file in source dir */ - - if (strendswith( pFile->name, ".h" ) && - (file = open_local_file( make, replace_extension( pFile->name, ".h", ".idl" ), &filename ))) - { - pFile->sourcename = filename; - pFile->filename = obj_dir_path( make, pFile->name ); - return file; - } + /* check for generated files */ + if ((file = open_local_generated_file( make, pFile, ".tab.h", ".y" ))) return file; + if ((file = open_local_generated_file( make, pFile, ".h", ".idl" ))) return file; /* check for extra targets */ if (strarray_exists( &make->extra_targets, pFile->name )) @@ -1343,45 +1368,19 @@ static struct file *open_include_file( const struct makefile *make, struct incl_ if ((file = open_local_file( make, pFile->name, &pFile->filename ))) return file; /* check for global importlib (module dependency) */ - if (pFile->type == INCL_IMPORTLIB && find_importlib_module( pFile->name )) { pFile->filename = pFile->name; return NULL; } - /* check for corresponding idl file in global includes */ - - if (strendswith( pFile->name, ".h" ) && - (file = open_global_header( make, replace_extension( pFile->name, ".h", ".idl" ), &filename ))) - { - pFile->sourcename = filename; - pFile->filename = strmake( "include/%s", pFile->name ); - return file; - } - - /* check for corresponding .in file in global includes (for config.h.in) */ - - if (strendswith( pFile->name, ".h" ) && - (file = open_global_header( make, replace_extension( pFile->name, ".h", ".h.in" ), &filename ))) - { - pFile->sourcename = filename; - pFile->filename = strmake( "include/%s", pFile->name ); - return file; - } - - /* check for corresponding .x file in global includes */ - + /* check for generated files in global includes */ + if ((file = open_global_generated_file( make, pFile, ".h", ".idl" ))) return file; + if ((file = open_global_generated_file( make, pFile, ".h", ".h.in" ))) return file; if (strendswith( pFile->name, "tmpl.h" ) && - (file = open_global_header( make, replace_extension( pFile->name, ".h", ".x" ), &filename ))) - { - pFile->sourcename = filename; - pFile->filename = strmake( "include/%s", pFile->name ); - return file; - } + (file = open_global_generated_file( make, pFile, ".h", ".x" ))) return file; /* check in global includes source dir */ - if ((file = open_global_header( make, pFile->name, &pFile->filename ))) return file; /* check in global msvcrt includes */
1
0
0
0
Alistair Leslie-Hughes : msdasql: Connect to DSN in IDBInitialize Initialize.
by Alexandre Julliard
21 Jan '22
21 Jan '22
Module: wine Branch: master Commit: 9d1e3b3a76ab794193267279cafe47a30df2923b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9d1e3b3a76ab794193267279…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Jan 21 14:33:19 2022 +1100 msdasql: Connect to DSN in IDBInitialize Initialize. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msdasql/Makefile.in | 2 +- dlls/msdasql/msdasql_main.c | 63 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/dlls/msdasql/Makefile.in b/dlls/msdasql/Makefile.in index ee8fa672623..0f5453131f6 100644 --- a/dlls/msdasql/Makefile.in +++ b/dlls/msdasql/Makefile.in @@ -1,5 +1,5 @@ MODULE = msdasql.dll -IMPORTS = uuid ole32 oleaut32 +IMPORTS = uuid ole32 oleaut32 odbc32 EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/msdasql/msdasql_main.c b/dlls/msdasql/msdasql_main.c index bc208a74cc5..cf69195baf7 100644 --- a/dlls/msdasql/msdasql_main.c +++ b/dlls/msdasql/msdasql_main.c @@ -30,6 +30,9 @@ #include "initguid.h" #include "msdasql.h" +#include "odbcinst.h" +#include "sqlext.h" +#include "sqlucode.h" #include "msdasql_private.h" @@ -40,6 +43,22 @@ DEFINE_GUID(DBPROPSET_DBINIT, 0xc8b522bc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0 DEFINE_GUID(DBGUID_DEFAULT, 0xc8b521fb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); +static void dump_sql_diag_records(SQLSMALLINT type, SQLHANDLE handle) +{ + SQLCHAR state[6], msg[SQL_MAX_MESSAGE_LENGTH]; + SQLINTEGER native; + SQLSMALLINT i = 1, len; + + if (!TRACE_ON(msdasql)) + return; + + while(SQLGetDiagRec(type, handle, i, state, &native, msg, sizeof(msg), &len) != SQL_SUCCESS) + { + WARN("%d: %s: %s\n", i, state, msg); + i++; + } +} + static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) { *ppv = NULL; @@ -210,6 +229,10 @@ struct msdasql LONG ref; struct msdasql_prop properties[14]; + + /* ODBC Support */ + HENV henv; + HDBC hdbc; }; static inline struct msdasql *impl_from_IUnknown(IUnknown *iface) @@ -294,6 +317,10 @@ static ULONG WINAPI msdsql_Release(IUnknown *iface) if (!ref) { + SQLDisconnect(provider->hdbc); + + SQLFreeHandle(SQL_HANDLE_DBC, provider->hdbc); + SQLFreeHandle(SQL_HANDLE_ENV, provider->henv); free(provider); } @@ -502,8 +529,33 @@ static ULONG WINAPI dbinit_Release(IDBInitialize *iface) static HRESULT WINAPI dbinit_Initialize(IDBInitialize *iface) { struct msdasql *provider = impl_from_IDBInitialize(iface); + int i; + SQLRETURN ret; - FIXME("%p stub\n", provider); + FIXME("%p semi-stub\n", provider); + + for(i=0; i < sizeof(provider->properties); i++) + { + if (provider->properties[i].id == DBPROP_INIT_DATASOURCE) + break; + } + + if (i >= sizeof(provider->properties)) + { + ERR("Datasource not found\n"); + return E_FAIL; + } + + ret = SQLConnectW( provider->hdbc, (SQLWCHAR *)V_BSTR(&provider->properties[i].value), + SQL_NTS, (SQLWCHAR *)NULL, SQL_NTS, (SQLWCHAR *)NULL, SQL_NTS ); + TRACE("SQLConnectW ret %d\n", ret); + if (ret != SQL_SUCCESS) + { + dump_sql_diag_records(SQL_HANDLE_DBC, provider->hdbc); + + if (ret != SQL_SUCCESS_WITH_INFO) + return E_FAIL; + } return S_OK; } @@ -653,6 +705,15 @@ static HRESULT create_msdasql_provider(REFIID riid, void **ppv) } } + SQLAllocHandle(SQL_HANDLE_ENV, NULL, &provider->henv ); + if (SQLSetEnvAttr(provider->henv, SQL_ATTR_ODBC_VERSION, (void *)SQL_OV_ODBC3_80, 0) == SQL_ERROR) + { + WARN("Falling back to SQL_OV_ODBC3\n"); + SQLSetEnvAttr(provider->henv, SQL_ATTR_ODBC_VERSION, (void *)SQL_OV_ODBC3, 0); + } + + SQLAllocHandle(SQL_HANDLE_DBC, provider->henv, &provider->hdbc); + hr = IUnknown_QueryInterface(&provider->MSDASQL_iface, riid, ppv); IUnknown_Release(&provider->MSDASQL_iface); return hr;
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
73
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
Results per page:
10
25
50
100
200