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
May 2018
----- 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
716 discussions
Start a n
N
ew thread
Louis Lenders : xinput1_3: Quiet a noisy fixme.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: 2370bbfb02ff2ef9cd41b59f9c24aea5d206c749 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2370bbfb02ff2ef9cd41b59f…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Sat Mar 10 09:09:23 2018 +0100 xinput1_3: Quiet a noisy fixme. Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 2a4fb48583c66197cd3843fdcd7acb82d06afcd5) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/xinput1_3/xinput_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/xinput1_3/xinput_main.c b/dlls/xinput1_3/xinput_main.c index 402bd2f..94b7953 100644 --- a/dlls/xinput1_3/xinput_main.c +++ b/dlls/xinput1_3/xinput_main.c @@ -154,7 +154,10 @@ DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD index, GUID* render_guid, GUI DWORD WINAPI XInputGetBatteryInformation(DWORD index, BYTE type, XINPUT_BATTERY_INFORMATION* battery) { - FIXME("(index %u, type %u, battery %p) Stub!\n", index, type, battery); + static int once; + + if (!once++) + FIXME("(index %u, type %u, battery %p) Stub!\n", index, type, battery); if (index >= XUSER_MAX_COUNT) return ERROR_BAD_ARGUMENTS;
1
0
0
0
Piotr Caban : comctl32: Update all items rects in TREEVIEW_RecalculateVisibleOrder.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: 7b37d0973779e0ac4c4c235365bc29a4a90a400a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b37d0973779e0ac4c4c2353…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Mar 6 14:30:23 2018 -0600 comctl32: Update all items rects in TREEVIEW_RecalculateVisibleOrder. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit c195311c6230f01b92d93d16b60a42e39a63aa4c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/treeview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 9a37cf3..5772196 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -949,7 +949,7 @@ TREEVIEW_RecalculateVisibleOrder(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *start) infoPtr->maxVisibleOrder = order; - for (item = start; item != NULL; + for (item = infoPtr->root->firstChild; item != NULL; item = TREEVIEW_GetNextListItem(infoPtr, item)) { TREEVIEW_ComputeItemRect(infoPtr, item);
1
0
0
0
Michael Müller : wbemprox: Add FreePhysicalMemory to Win32_OperatingSystem.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: 2427fb6adce04bb6750f665641dc84cccbb4fc2f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2427fb6adce04bb6750f6656…
Author: Michael Müller <michael(a)fds-team.de> Date: Fri Mar 2 11:54:57 2018 +0100 wbemprox: Add FreePhysicalMemory to Win32_OperatingSystem. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit fe6127dc679606b70ad7a6fedf9b021d61038086) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/wbemprox/builtin.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index dd5b9ac..c356524 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -225,6 +225,8 @@ static const WCHAR prop_flavorW[] = {'F','l','a','v','o','r',0}; static const WCHAR prop_freespaceW[] = {'F','r','e','e','S','p','a','c','e',0}; +static const WCHAR prop_freephysicalmemoryW[] = + {'F','r','e','e','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; static const WCHAR prop_handleW[] = {'H','a','n','d','l','e',0}; static const WCHAR prop_horizontalresolutionW[] = @@ -539,6 +541,7 @@ static const struct column col_os[] = { prop_codesetW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_countrycodeW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_csdversionW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_freephysicalmemoryW, CIM_UINT64 }, { prop_installdateW, CIM_DATETIME }, { prop_lastbootuptimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, { prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, @@ -939,6 +942,7 @@ struct record_operatingsystem const WCHAR *codeset; const WCHAR *countrycode; const WCHAR *csdversion; + UINT64 freephysicalmemory; const WCHAR *installdate; const WCHAR *lastbootuptime; const WCHAR *localdatetime; @@ -1322,6 +1326,15 @@ static UINT64 get_total_physical_memory(void) return status.ullTotalPhys; } +static UINT64 get_available_physical_memory(void) +{ + MEMORYSTATUSEX status; + + status.dwLength = sizeof(status); + if (!GlobalMemoryStatusEx( &status )) return 1024 * 1024 * 1024; + return status.ullAvailPhys; +} + static WCHAR *get_computername(void) { WCHAR *ret; @@ -2892,6 +2905,7 @@ static enum fill_status fill_os( struct table *table, const struct expr *cond ) rec->codeset = get_codeset(); rec->countrycode = get_countrycode(); rec->csdversion = ver.szCSDVersion[0] ? heap_strdupW( ver.szCSDVersion ) : NULL; + rec->freephysicalmemory = get_available_physical_memory() / 1024; rec->installdate = os_installdateW; rec->lastbootuptime = get_lastbootuptime(); rec->localdatetime = get_localdatetime();
1
0
0
0
Sebastian Lackner : d3dx9: Adjust ID3DXEffect interface based on DLL version.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: 6f28ed8b64d2907a1b1e31b61fd6f49f9dafb6ff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6f28ed8b64d2907a1b1e31b6…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Mar 13 22:56:10 2018 -0600 d3dx9: Adjust ID3DXEffect interface based on DLL version. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 1c8c9308e74abe5e5d85dfe722dea10e60092e7c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3dx9_36/effect.c | 8 ++++++++ include/d3dx9effect.h | 13 ++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index f8c4803..bd1a9e1 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -4351,6 +4351,7 @@ static HRESULT WINAPI ID3DXEffectImpl_ApplyParameterBlock(ID3DXEffect* iface, D3 return E_NOTIMPL; } +#if D3DX_SDK_VERSION >= 26 static HRESULT WINAPI ID3DXEffectImpl_DeleteParameterBlock(ID3DXEffect* iface, D3DXHANDLE parameter_block) { struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); @@ -4359,6 +4360,7 @@ static HRESULT WINAPI ID3DXEffectImpl_DeleteParameterBlock(ID3DXEffect* iface, D return E_NOTIMPL; } +#endif static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface, struct IDirect3DDevice9 *device, struct ID3DXEffect **effect) @@ -4370,6 +4372,7 @@ static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface, return E_NOTIMPL; } +#if D3DX_SDK_VERSION >= 27 static HRESULT WINAPI ID3DXEffectImpl_SetRawValue(ID3DXEffect *iface, D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes) { @@ -4378,6 +4381,7 @@ static HRESULT WINAPI ID3DXEffectImpl_SetRawValue(ID3DXEffect *iface, return E_NOTIMPL; } +#endif static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl = { @@ -4460,9 +4464,13 @@ static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl = ID3DXEffectImpl_BeginParameterBlock, ID3DXEffectImpl_EndParameterBlock, ID3DXEffectImpl_ApplyParameterBlock, +#if D3DX_SDK_VERSION >= 26 ID3DXEffectImpl_DeleteParameterBlock, +#endif ID3DXEffectImpl_CloneEffect, +#if D3DX_SDK_VERSION >= 27 ID3DXEffectImpl_SetRawValue +#endif }; static inline struct ID3DXEffectCompilerImpl *impl_from_ID3DXEffectCompiler(ID3DXEffectCompiler *iface) diff --git a/include/d3dx9effect.h b/include/d3dx9effect.h index 8235794..5dd1e75 100644 --- a/include/d3dx9effect.h +++ b/include/d3dx9effect.h @@ -197,7 +197,13 @@ DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown) typedef struct ID3DXEffect *LPD3DXEFFECT; -DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5); +#if D3DX_SDK_VERSION <= 25 +DEFINE_GUID(IID_ID3DXEffect, 0xd165ccb1, 0x62b0, 0x4a33, 0xb3, 0xfa, 0xa9, 0x23, 0x00, 0x30, 0x5a, 0x11); +#elif D3DX_SDK_VERSION == 26 +DEFINE_GUID(IID_ID3DXEffect, 0xc7b17651, 0x5420, 0x490e, 0x8a, 0x7f, 0x92, 0x36, 0x75, 0xa2, 0xd6, 0x87); +#else +DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0x0c, 0xd5); +#endif #define INTERFACE ID3DXEffect @@ -282,10 +288,15 @@ DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect) STDMETHOD(BeginParameterBlock)(THIS) PURE; STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE; STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE; +#if D3DX_SDK_VERSION >= 26 STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE; +#endif STDMETHOD(CloneEffect)(THIS_ struct IDirect3DDevice9 *device, struct ID3DXEffect **effect) PURE; +#if D3DX_SDK_VERSION >= 27 STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes) PURE; +#endif }; + #undef INTERFACE typedef struct ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
1
0
0
0
Akihiro Sagawa : ws2_32: Fix ioctlsocket(FIONREAD) with listening socket.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: 0fc217c8298c8feb1afc5baf758d667de40f6f78 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0fc217c8298c8feb1afc5baf…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Sun Feb 25 15:01:05 2018 +0900 ws2_32: Fix ioctlsocket(FIONREAD) with listening socket. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit f6b6c94add5991279828d07f45c6abb4f9f2a74e) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ws2_32/socket.c | 12 ++++++++++++ dlls/ws2_32/tests/sock.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 79b9333..1105282 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -4648,12 +4648,24 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID case WS_FIONREAD: { +#if defined(linux) + int listening = 0; + socklen_t len = sizeof(listening); +#endif if (out_size != sizeof(WS_u_long) || IS_INTRESOURCE(out_buff)) { SetLastError(WSAEFAULT); return SOCKET_ERROR; } if ((fd = get_sock_fd( s, 0, NULL )) == -1) return SOCKET_ERROR; + +#if defined(linux) + /* On Linux, FIONREAD on listening socket always fails (see tcp(7)). + However, it succeeds on native. */ + if (!getsockopt( fd, SOL_SOCKET, SO_ACCEPTCONN, &listening, &len ) && listening) + (*(WS_u_long *) out_buff) = 0; + else +#endif if (ioctl(fd, FIONREAD, out_buff ) == -1) status = wsaErrno(); release_sock_fd( s, fd ); diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index ae58401..754c58b 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -5233,8 +5233,8 @@ static void test_ioctlsocket(void) /* test FIONREAD with listening socket */ arg = 0xdeadbeef; ret = ioctlsocket(sock, FIONREAD, &arg); - todo_wine ok(ret == 0, "ioctlsocket failed unexpectedly with error %d\n", WSAGetLastError()); - todo_wine ok(arg == 0, "expected 0, got %u\n", arg); + ok(ret == 0, "ioctlsocket failed unexpectedly with error %d\n", WSAGetLastError()); + ok(arg == 0, "expected 0, got %u\n", arg); closesocket(sock);
1
0
0
0
Akihiro Sagawa : ws2_32/tests: Add ioctlsocket(FIONREAD) tests with listening socket.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: 7424748dc89f2c6afdd98eab30ca25e74dcef689 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7424748dc89f2c6afdd98eab…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Sun Feb 25 15:01:03 2018 +0900 ws2_32/tests: Add ioctlsocket(FIONREAD) tests with listening socket. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 13b66d3d1c34c6f366b1a255d993d4ac5d6b19b6) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ws2_32/tests/sock.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 96631ae..ae58401 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -5120,6 +5120,7 @@ static void test_ioctlsocket(void) { SOCKET sock, src, dst; struct tcp_keepalive kalive; + struct sockaddr_in address; int ret, optval; static const LONG cmds[] = {FIONBIO, FIONREAD, SIOCATMARK}; UINT i, bytes_rec; @@ -5205,6 +5206,38 @@ static void test_ioctlsocket(void) closesocket(sock); + sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ok(sock != INVALID_SOCKET, "Creating the socket failed: %d\n", WSAGetLastError()); + if(sock == INVALID_SOCKET) + { + skip("Can't continue without a socket.\n"); + return; + } + + /* test FIONREAD with a fresh and non-connected socket */ + arg = 0xdeadbeef; + ret = ioctlsocket(sock, FIONREAD, &arg); + ok(ret == 0, "ioctlsocket failed unexpectedly with error %d\n", WSAGetLastError()); + ok(arg == 0, "expected 0, got %u\n", arg); + + memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = inet_addr( SERVERIP ); + address.sin_port = htons( SERVERPORT ); + ret = bind(sock, (struct sockaddr *)&address, sizeof(address)); + ok(ret == 0, "bind failed unexpectedly with error %d\n", WSAGetLastError()); + + ret = listen(sock, SOMAXCONN); + ok(ret == 0, "listen failed unexpectedly with error %d\n", WSAGetLastError()); + + /* test FIONREAD with listening socket */ + arg = 0xdeadbeef; + ret = ioctlsocket(sock, FIONREAD, &arg); + todo_wine ok(ret == 0, "ioctlsocket failed unexpectedly with error %d\n", WSAGetLastError()); + todo_wine ok(arg == 0, "expected 0, got %u\n", arg); + + closesocket(sock); + if (tcp_socketpair(&src, &dst) != 0) { ok(0, "creating socket pair failed, skipping test\n");
1
0
0
0
Sebastian Lackner : ntdll: Fix condition mask handling in RtlVerifyVersionInfo.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: f7f77089619f8df30054e36cb54eddb11063340b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f7f77089619f8df30054e36c…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Feb 27 14:18:38 2018 +0300 ntdll: Fix condition mask handling in RtlVerifyVersionInfo. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 004d32dae6cbb419e926fb9c6ad410d17b68f56c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/kernel32/tests/version.c | 14 ------------- dlls/ntdll/version.c | 49 +++++++++++++++++++++++++++++++------------ 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c index 8360994..e4f4a9f 100644 --- a/dlls/kernel32/tests/version.c +++ b/dlls/kernel32/tests/version.c @@ -201,9 +201,6 @@ static void test_VerifyVersionInfo(void) VER_MAJORVERSION, VER_EQUAL, VER_MINORVERSION, VER_LESS, - 0, 0, - 0, 0, - TRUE, }, { VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, @@ -284,9 +281,6 @@ static void test_VerifyVersionInfo(void) VER_SERVICEPACKMAJOR, VER_EQUAL, VER_SERVICEPACKMINOR, VER_LESS, - 0, 0, - 0, 0, - TRUE, }, { VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, @@ -304,8 +298,6 @@ static void test_VerifyVersionInfo(void) VER_MINORVERSION, VER_EQUAL, VER_SERVICEPACKMAJOR, VER_EQUAL, VER_SERVICEPACKMINOR, VER_LESS, - 0, 0, - TRUE, }, { VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, @@ -325,7 +317,6 @@ static void test_VerifyVersionInfo(void) VER_MINORVERSION, VER_EQUAL, VER_SERVICEPACKMAJOR, VER_EQUAL, VER_SERVICEPACKMINOR, VER_LESS, - TRUE, }, { VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, @@ -368,9 +359,6 @@ static void test_VerifyVersionInfo(void) VER_MAJORVERSION, VER_EQUAL, VER_SERVICEPACKMAJOR, VER_LESS, - 0, 0, - 0, 0, - TRUE, }, { VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, @@ -388,8 +376,6 @@ static void test_VerifyVersionInfo(void) VER_MAJORVERSION, VER_EQUAL, VER_MINORVERSION, VER_EQUAL, VER_SERVICEPACKMAJOR, VER_LESS, - 0, 0, - TRUE }, { VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c index 58ccb95..1674261 100644 --- a/dlls/ntdll/version.c +++ b/dlls/ntdll/version.c @@ -657,6 +657,34 @@ BOOLEAN WINAPI RtlGetNtProductType( LPDWORD type ) return TRUE; } +static inline UCHAR version_update_condition(UCHAR *last_condition, UCHAR condition) +{ + switch (*last_condition) + { + case 0: + *last_condition = condition; + break; + case VER_EQUAL: + if (condition >= VER_EQUAL && condition <= VER_LESS_EQUAL) + { + *last_condition = condition; + return condition; + } + break; + case VER_GREATER: + case VER_GREATER_EQUAL: + if (condition >= VER_EQUAL && condition <= VER_GREATER_EQUAL) + return condition; + break; + case VER_LESS: + case VER_LESS_EQUAL: + if (condition == VER_EQUAL || (condition >= VER_LESS && condition <= VER_LESS_EQUAL)) + return condition; + break; + } + if (!condition) *last_condition |= 0x10; + return *last_condition & 0xf; +} static inline NTSTATUS version_compare_values(ULONG left, ULONG right, UCHAR condition) { @@ -733,38 +761,33 @@ NTSTATUS WINAPI RtlVerifyVersionInfo( const RTL_OSVERSIONINFOEXW *info, if(dwTypeMask & (VER_MAJORVERSION|VER_MINORVERSION|VER_SERVICEPACKMAJOR|VER_SERVICEPACKMINOR)) { - unsigned char condition = 0; + unsigned char condition, last_condition = 0; BOOLEAN do_next_check = TRUE; if(dwTypeMask & VER_MAJORVERSION) - condition = dwlConditionMask >> 1*3 & 0x07; - else if(dwTypeMask & VER_MINORVERSION) - condition = dwlConditionMask >> 0*3 & 0x07; - else if(dwTypeMask & VER_SERVICEPACKMAJOR) - condition = dwlConditionMask >> 5*3 & 0x07; - else if(dwTypeMask & VER_SERVICEPACKMINOR) - condition = dwlConditionMask >> 4*3 & 0x07; - - if(dwTypeMask & VER_MAJORVERSION) { + condition = version_update_condition(&last_condition, dwlConditionMask >> 1*3 & 0x07); status = version_compare_values(ver.dwMajorVersion, info->dwMajorVersion, condition); do_next_check = (ver.dwMajorVersion == info->dwMajorVersion) && - ((condition != VER_EQUAL) || (status == STATUS_SUCCESS)); + ((condition >= VER_EQUAL) && (condition <= VER_LESS_EQUAL)); } if((dwTypeMask & VER_MINORVERSION) && do_next_check) { + condition = version_update_condition(&last_condition, dwlConditionMask >> 0*3 & 0x07); status = version_compare_values(ver.dwMinorVersion, info->dwMinorVersion, condition); do_next_check = (ver.dwMinorVersion == info->dwMinorVersion) && - ((condition != VER_EQUAL) || (status == STATUS_SUCCESS)); + ((condition >= VER_EQUAL) && (condition <= VER_LESS_EQUAL)); } if((dwTypeMask & VER_SERVICEPACKMAJOR) && do_next_check) { + condition = version_update_condition(&last_condition, dwlConditionMask >> 5*3 & 0x07); status = version_compare_values(ver.wServicePackMajor, info->wServicePackMajor, condition); do_next_check = (ver.wServicePackMajor == info->wServicePackMajor) && - ((condition != VER_EQUAL) || (status == STATUS_SUCCESS)); + ((condition >= VER_EQUAL) && (condition <= VER_LESS_EQUAL)); } if((dwTypeMask & VER_SERVICEPACKMINOR) && do_next_check) { + condition = version_update_condition(&last_condition, dwlConditionMask >> 4*3 & 0x07); status = version_compare_values(ver.wServicePackMinor, info->wServicePackMinor, condition); }
1
0
0
0
Nikolay Sivov : kernel32/tests: Add more tests for VerifyVersionInfo().
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: e23a8ceb828948fe59b7a2c117b8fb0a59cc8baf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e23a8ceb828948fe59b7a2c1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Feb 25 19:37:48 2018 +0300 kernel32/tests: Add more tests for VerifyVersionInfo(). New tests cases by Sebastian Lackner. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 60a5ee6560a2048d31e694dee147465bd89a366f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/kernel32/tests/version.c | 634 ++++++++++++++++++++++++++++++++---------- 1 file changed, 493 insertions(+), 141 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e23a8ceb828948fe59b7…
1
0
0
0
Piotr Caban : user32/tests: Add listbox WM_MEASUREITEM tests.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: 6b862a4c95a0f57eea753582bd2ab4cc8fef92ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6b862a4c95a0f57eea753582…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Feb 28 17:37:03 2018 +0100 user32/tests: Add listbox WM_MEASUREITEM tests. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 43df3f468f2d3364345a685ca9f236a8502fa3a5) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/tests/listbox.c | 55 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 91d4675..88d3adb 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -46,6 +46,15 @@ static const char * const strings[4] = { static const char BAD_EXTENSION[] = "*.badtxt"; +static int strcmp_aw(LPCWSTR strw, const char *stra) +{ + WCHAR buf[1024]; + + if (!stra) return 1; + MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, sizeof(buf)/sizeof(WCHAR)); + return lstrcmpW(strw, buf); +} + static HWND create_listbox (DWORD add_style, HWND parent) { @@ -239,6 +248,31 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA { switch (msg) { + case WM_MEASUREITEM: + { + DWORD style = GetWindowLongA(GetWindow(hwnd, GW_CHILD), GWL_STYLE); + MEASUREITEMSTRUCT *mi = (void*)lparam; + + ok(wparam == mi->CtlID, "got wParam=%08lx, expected %08x\n", wparam, mi->CtlID); + ok(mi->CtlType == ODT_LISTBOX, "mi->CtlType = %u\n", mi->CtlType); + ok(mi->CtlID == 1, "mi->CtlID = %u\n", mi->CtlID); + ok(mi->itemHeight, "mi->itemHeight = 0\n"); + + if (mi->itemID > 4 || style & LBS_OWNERDRAWFIXED) + break; + + if (style & LBS_HASSTRINGS) + { + ok(!strcmp_aw((WCHAR*)mi->itemData, strings[mi->itemID]), + "mi->itemData = %s (%d)\n", wine_dbgstr_w((WCHAR*)mi->itemData), mi->itemID); + } + else + { + ok((void*)mi->itemData == strings[mi->itemID], + "mi->itemData = %08lx, expected %p\n", mi->itemData, strings[mi->itemID]); + } + break; + } case WM_DRAWITEM: { RECT rc_item, rc_client, rc_clip; @@ -1822,6 +1856,26 @@ static void test_extents(void) DestroyWindow(parent); } +static void test_WM_MEASUREITEM(void) +{ + HWND parent, listbox; + LRESULT data; + + parent = create_parent(); + listbox = create_listbox(WS_CHILD | LBS_OWNERDRAWVARIABLE, parent); + + data = SendMessageA(listbox, LB_GETITEMDATA, 0, 0); + ok(data == (LRESULT)strings[0], "data = %08lx, expected %p\n", data, strings[0]); + DestroyWindow(parent); + + parent = create_parent(); + listbox = create_listbox(WS_CHILD | LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS, parent); + + data = SendMessageA(listbox, LB_GETITEMDATA, 0, 0); + ok(!data, "data = %08lx\n", data); + DestroyWindow(parent); +} + START_TEST(listbox) { const struct listbox_test SS = @@ -1905,4 +1959,5 @@ START_TEST(listbox) test_GetListBoxInfo(); test_missing_lbuttonup(); test_extents(); + test_WM_MEASUREITEM(); }
1
0
0
0
Piotr Caban : user32: Fix itemData passed in ListBox WM_MEASUREITEM message.
by Alexandre Julliard
14 May '18
14 May '18
Module: wine Branch: stable Commit: 37d6f0521f7b20e083794ae9cf54c1662165b0d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=37d6f0521f7b20e083794ae9…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Feb 28 17:36:51 2018 +0100 user32: Fix itemData passed in ListBox WM_MEASUREITEM message. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 3c5c9b157771828419cb5d7e831d46813ede041f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/listbox.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 6b47f05..947db28 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -1547,7 +1547,7 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index, RtlMoveMemory( item + 1, item, (descr->nb_items - index) * sizeof(LB_ITEMDATA) ); item->str = str; - item->data = data; + item->data = HAS_STRINGS(descr) ? 0 : data; item->height = 0; item->selected = FALSE; descr->nb_items++; @@ -1562,7 +1562,7 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index, mis.CtlType = ODT_LISTBOX; mis.CtlID = id; mis.itemID = index; - mis.itemData = descr->items[index].data; + mis.itemData = data; mis.itemHeight = descr->item_height; SendMessageW( descr->owner, WM_MEASUREITEM, id, (LPARAM)&mis ); item->height = mis.itemHeight ? mis.itemHeight : 1; @@ -1603,7 +1603,6 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index, static LRESULT LISTBOX_InsertString( LB_DESCR *descr, INT index, LPCWSTR str ) { LPWSTR new_str = NULL; - ULONG_PTR data = 0; LRESULT ret; if (HAS_STRINGS(descr)) @@ -1617,10 +1616,9 @@ static LRESULT LISTBOX_InsertString( LB_DESCR *descr, INT index, LPCWSTR str ) } strcpyW(new_str, str); } - else data = (ULONG_PTR)str; if (index == -1) index = descr->nb_items; - if ((ret = LISTBOX_InsertItem( descr, index, new_str, data )) != 0) + if ((ret = LISTBOX_InsertItem( descr, index, new_str, (ULONG_PTR)str )) != 0) { HeapFree( GetProcessHeap(), 0, new_str ); return ret;
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
72
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
Results per page:
10
25
50
100
200