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
August 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
2 participants
703 discussions
Start a n
N
ew thread
Chip Davis : ntdll: Stub power request APIs.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: ca2b7012496c4a97d7c03bc34b388592fd1157f5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ca2b7012496c4a97d7c03bc3…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Wed Jul 31 21:40:28 2019 -0500 ntdll: Stub power request APIs. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/nt.c | 33 +++++++++++++++++++++++++++++++++ dlls/ntdll/ntdll.spec | 6 ++++++ include/winbase.h | 7 ------- include/winnt.h | 7 +++++++ include/winternl.h | 20 ++++++++++++++++++++ 5 files changed, 66 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index cdfbd9f..a9985fb 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -3073,6 +3073,39 @@ NTSTATUS WINAPI NtSetThreadExecutionState( EXECUTION_STATE new_state, EXECUTION_ return STATUS_SUCCESS; } +/****************************************************************************** + * NtCreatePowerRequest [NTDLL.@] + * + */ +NTSTATUS WINAPI NtCreatePowerRequest( HANDLE *handle, COUNTED_REASON_CONTEXT *context ) +{ + FIXME( "(%p, %p): stub\n", handle, context ); + + return STATUS_NOT_IMPLEMENTED; +} + +/****************************************************************************** + * NtSetPowerRequest [NTDLL.@] + * + */ +NTSTATUS WINAPI NtSetPowerRequest( HANDLE handle, POWER_REQUEST_TYPE type ) +{ + FIXME( "(%p, %u): stub\n", handle, type ); + + return STATUS_NOT_IMPLEMENTED; +} + +/****************************************************************************** + * NtClearPowerRequest [NTDLL.@] + * + */ +NTSTATUS WINAPI NtClearPowerRequest( HANDLE handle, POWER_REQUEST_TYPE type ) +{ + FIXME( "(%p, %u): stub\n", handle, type ); + + return STATUS_NOT_IMPLEMENTED; +} + #ifdef linux /* Fallback using /proc/cpuinfo for Linux systems without cpufreq. For * most distributions on recent enough hardware, this is only likely to diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 278699c..32b2f61 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -142,6 +142,7 @@ @ stdcall NtCancelIoFileEx(long ptr ptr) @ stdcall NtCancelTimer(long ptr) @ stdcall NtClearEvent(long) +@ stdcall NtClearPowerRequest(long long) @ stdcall NtClose(long) @ stub NtCloseObjectAuditAlarm # @ stub NtCompactKeys @@ -167,6 +168,7 @@ @ stdcall NtCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr) @ stdcall NtCreatePagingFile(ptr ptr ptr ptr) @ stdcall NtCreatePort(ptr ptr long long ptr) +@ stdcall NtCreatePowerRequest(ptr ptr) @ stub NtCreateProcess # @ stub NtCreateProcessEx @ stub NtCreateProfile @@ -374,6 +376,7 @@ @ stub NtSetLowEventPair @ stub NtSetLowWaitHighEventPair @ stub NtSetLowWaitHighThread +@ stdcall NtSetPowerRequest(long long) # @ stub NtSetQuotaInformationFile @ stdcall NtSetSecurityObject(long long ptr) @ stub NtSetSystemEnvironmentValue @@ -1094,6 +1097,7 @@ @ stdcall -private ZwCancelIoFileEx(long ptr ptr) NtCancelIoFileEx @ stdcall -private ZwCancelTimer(long ptr) NtCancelTimer @ stdcall -private ZwClearEvent(long) NtClearEvent +@ stdcall -private ZwClearPowerRequest(long long) NtClearPowerRequest @ stdcall -private ZwClose(long) NtClose @ stub ZwCloseObjectAuditAlarm # @ stub ZwCompactKeys @@ -1118,6 +1122,7 @@ @ stdcall -private ZwCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr) NtCreateNamedPipeFile @ stdcall -private ZwCreatePagingFile(ptr ptr ptr ptr) NtCreatePagingFile @ stdcall -private ZwCreatePort(ptr ptr long long ptr) NtCreatePort +@ stdcall -private ZwCreatePowerRequest(ptr ptr) NtCreatePowerRequest @ stub ZwCreateProcess # @ stub ZwCreateProcessEx @ stub ZwCreateProfile @@ -1323,6 +1328,7 @@ @ stub ZwSetLowEventPair @ stub ZwSetLowWaitHighEventPair @ stub ZwSetLowWaitHighThread +@ stdcall -private ZwSetPowerRequest(long long) NtSetPowerRequest # @ stub ZwSetQuotaInformationFile @ stdcall -private ZwSetSecurityObject(long long ptr) NtSetSecurityObject @ stub ZwSetSystemEnvironmentValue diff --git a/include/winbase.h b/include/winbase.h index 086a8b3..9ee290a 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -966,13 +966,6 @@ typedef struct _SYSTEM_POWER_STATUS DWORD BatteryFullLifeTime; } SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS; -typedef enum _POWER_REQUEST_TYPE -{ - PowerRequestDisplayRequired, - PowerRequestSystemRequired, - PowerRequestAwayModeRequired -} POWER_REQUEST_TYPE, *PPOWER_REQUEST_TYPE; - typedef struct _SYSTEM_INFO { union { diff --git a/include/winnt.h b/include/winnt.h index 9eb61db..613f858 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -5578,6 +5578,13 @@ typedef struct _SYSTEM_POWER_POLICY { } SYSTEM_POWER_POLICY, *PSYSTEM_POWER_POLICY; +typedef enum _POWER_REQUEST_TYPE +{ + PowerRequestDisplayRequired, + PowerRequestSystemRequired, + PowerRequestAwayModeRequired +} POWER_REQUEST_TYPE, *PPOWER_REQUEST_TYPE; + typedef union _FILE_SEGMENT_ELEMENT { PVOID64 Buffer; ULONGLONG Alignment; diff --git a/include/winternl.h b/include/winternl.h index d654391..fd898e9 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2070,6 +2070,23 @@ typedef enum _SHUTDOWN_ACTION { ShutdownPowerOff } SHUTDOWN_ACTION, *PSHUTDOWN_ACTION; +typedef struct _COUNTED_REASON_CONTEXT +{ + ULONG Version; + ULONG Flags; + union + { + struct + { + UNICODE_STRING ResourceFileName; + USHORT ResourceReasonId; + ULONG StringCount; + UNICODE_STRING *ReasonStrings; + } DUMMYSTRUCTNAME; + UNICODE_STRING SimpleString; + } DUMMYUNIONNAME; +} COUNTED_REASON_CONTEXT, *PCOUNTED_REASON_CONTEXT; + typedef enum _KPROFILE_SOURCE { ProfileTime, ProfileAlignmentFixup, @@ -2326,6 +2343,7 @@ NTSYSAPI NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK); NTSYSAPI NTSTATUS WINAPI NtCancelIoFileEx(HANDLE,PIO_STATUS_BLOCK,PIO_STATUS_BLOCK); NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*); NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE); +NTSYSAPI NTSTATUS WINAPI NtClearPowerRequest(HANDLE,POWER_REQUEST_TYPE); NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE); NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE); @@ -2345,6 +2363,7 @@ NTSYSAPI NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIB NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER); NTSYSAPI NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,PLARGE_INTEGER); NTSYSAPI NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG); +NTSYSAPI NTSTATUS WINAPI NtCreatePowerRequest(HANDLE*,COUNTED_REASON_CONTEXT*); NTSYSAPI NTSTATUS WINAPI NtCreateProcess(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,BOOLEAN,HANDLE,HANDLE,HANDLE); NTSYSAPI NTSTATUS WINAPI NtCreateProfile(PHANDLE,HANDLE,PVOID,ULONG,ULONG,PVOID,ULONG,KPROFILE_SOURCE,KAFFINITY); NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE); @@ -2510,6 +2529,7 @@ NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG); NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE); NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE); NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighThread(VOID); +NTSYSAPI NTSTATUS WINAPI NtSetPowerRequest(HANDLE,POWER_REQUEST_TYPE); NTSYSAPI NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_STRING); NTSYSAPI NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
1
0
0
0
Chip Davis : ntdll: Move SetThreadExecutionState() implementation to ntdll.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: 6420ebdf93373ebad789d471f6235a4d8a585188 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6420ebdf93373ebad789d471…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Wed Jul 31 17:24:55 2019 -0500 ntdll: Move SetThreadExecutionState() implementation to ntdll. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/powermgnt.c | 9 +++------ dlls/ntdll/nt.c | 17 +++++++++++++++++ dlls/ntdll/ntdll.spec | 4 ++-- include/winternl.h | 1 + 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/dlls/kernel32/powermgnt.c b/dlls/kernel32/powermgnt.c index 81e43b4..056dd9d 100644 --- a/dlls/kernel32/powermgnt.c +++ b/dlls/kernel32/powermgnt.c @@ -21,6 +21,7 @@ #include "windef.h" #include "winbase.h" +#include "winternl.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(powermgnt); @@ -100,14 +101,10 @@ BOOL WINAPI SetSystemPowerState(BOOL suspend_or_hibernate, */ EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE flags) { - static EXECUTION_STATE current = - ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED | ES_USER_PRESENT; - EXECUTION_STATE old = current; + EXECUTION_STATE old; - WARN("(0x%x): stub, harmless.\n", flags); + NtSetThreadExecutionState(flags, &old); - if (!(current & ES_CONTINUOUS) || (flags & ES_CONTINUOUS)) - current = flags; return old; } diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index b58c2d6..cdfbd9f 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -3056,6 +3056,23 @@ NTSTATUS WINAPI NtInitiatePowerAction( return STATUS_NOT_IMPLEMENTED; } +/****************************************************************************** + * NtSetThreadExecutionState [NTDLL.@] + * + */ +NTSTATUS WINAPI NtSetThreadExecutionState( EXECUTION_STATE new_state, EXECUTION_STATE *old_state ) +{ + static EXECUTION_STATE current = + ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED | ES_USER_PRESENT; + *old_state = current; + + WARN( "(0x%x, %p): stub, harmless.\n", new_state, old_state ); + + if (!(current & ES_CONTINUOUS) || (new_state & ES_CONTINUOUS)) + current = new_state; + return STATUS_SUCCESS; +} + #ifdef linux /* Fallback using /proc/cpuinfo for Linux systems without cpufreq. For * most distributions on recent enough hardware, this is only likely to diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 323d5ea..278699c 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -381,7 +381,7 @@ @ stdcall NtSetSystemInformation(long ptr long) @ stub NtSetSystemPowerState @ stdcall NtSetSystemTime(ptr ptr) -# @ stub NtSetThreadExecutionState +@ stdcall NtSetThreadExecutionState(long ptr) @ stdcall NtSetTimer(long ptr ptr ptr long long ptr) @ stdcall NtSetTimerResolution(long long ptr) # @ stub NtSetUuidSeed @@ -1330,7 +1330,7 @@ @ stdcall -private ZwSetSystemInformation(long ptr long) NtSetSystemInformation @ stub ZwSetSystemPowerState @ stdcall -private ZwSetSystemTime(ptr ptr) NtSetSystemTime -# @ stub ZwSetThreadExecutionState +@ stdcall ZwSetThreadExecutionState(long ptr) NtSetThreadExecutionState @ stdcall -private ZwSetTimer(long ptr ptr ptr long long ptr) NtSetTimer @ stdcall -private ZwSetTimerResolution(long long ptr) NtSetTimerResolution # @ stub ZwSetUuidSeed diff --git a/include/winternl.h b/include/winternl.h index 49eedaf..d654391 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2515,6 +2515,7 @@ NTSYSAPI NTSTATUS WINAPI NtSetSystemEnvironmentValue(PUNICODE_STRING,PUNICODE_S NTSYSAPI NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG); NTSYSAPI NTSTATUS WINAPI NtSetSystemPowerState(POWER_ACTION,SYSTEM_POWER_STATE,ULONG); NTSYSAPI NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*); +NTSYSAPI NTSTATUS WINAPI NtSetThreadExecutionState(EXECUTION_STATE,EXECUTION_STATE*); NTSYSAPI NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*); NTSYSAPI NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG); NTSYSAPI NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
1
0
0
0
Chip Davis : ntdll: Implement RtlCaptureStackBackTrace() for x86_64.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: 4e4aa467752db723cb36ea140860ea24efbe5719 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4e4aa467752db723cb36ea14…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Wed Jul 31 16:57:10 2019 -0500 ntdll: Implement RtlCaptureStackBackTrace() for x86_64. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=40868
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47101
Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_x86_64.c | 111 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index b024de7..9441230 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -4436,13 +4436,120 @@ __ASM_GLOBAL_FUNC( RtlRaiseException, "call " __ASM_NAME("RtlRaiseStatus") /* does not return */ ); +static inline ULONG hash_pointers( void **ptrs, ULONG count ) +{ + /* Based on MurmurHash2, which is in the public domain */ + static const ULONG m = 0x5bd1e995; + static const ULONG r = 24; + ULONG hash = count * sizeof(void*); + for (; count > 0; ptrs++, count--) + { + ULONG_PTR data = (ULONG_PTR)*ptrs; + ULONG k1 = (ULONG)(data & 0xffffffff), k2 = (ULONG)(data >> 32); + k1 *= m; + k1 = (k1 ^ (k1 >> r)) * m; + k2 *= m; + k2 = (k2 ^ (k2 >> r)) * m; + hash = (((hash * m) ^ k1) * m) ^ k2; + } + hash = (hash ^ (hash >> 13)) * m; + return hash ^ (hash >> 15); +} + + /************************************************************************* * RtlCaptureStackBackTrace (NTDLL.@) */ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer, ULONG *hash ) { - FIXME( "(%d, %d, %p, %p) stub!\n", skip, count, buffer, hash ); - return 0; + UNWIND_HISTORY_TABLE table; + DISPATCHER_CONTEXT dispatch; + CONTEXT context; + LDR_MODULE *module; + NTSTATUS status; + ULONG i; + USHORT num_entries = 0; + + TRACE( "(%u, %u, %p, %p)", skip, count, buffer, hash ); + + RtlCaptureContext( &context ); + dispatch.TargetIp = 0; + dispatch.ContextRecord = &context; + dispatch.HistoryTable = &table; + if (hash) *hash = 0; + for (i = 0; i < skip + count; i++) + { + /* FIXME: should use the history table to make things faster */ + + dispatch.ImageBase = 0; + dispatch.ControlPc = context.Rip; + dispatch.ScopeIndex = 0; + + /* first look for PE exception information */ + + if ((dispatch.FunctionEntry = lookup_function_info( dispatch.ControlPc, &dispatch.ImageBase, &module ))) + { + RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase, dispatch.ControlPc, + dispatch.FunctionEntry, &context, &dispatch.HandlerData, + &dispatch.EstablisherFrame, NULL ); + goto unwind_done; + } + + /* then look for host system exception information */ + + if (!module || (module->Flags & LDR_WINE_INTERNAL)) + { + BOOL got_info = FALSE; + struct dwarf_eh_bases bases; + const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(dispatch.ControlPc - 1), &bases ); + + if (fde) + { + status = dwarf_virtual_unwind( dispatch.ControlPc, &dispatch.EstablisherFrame, &context, + fde, &bases, &dispatch.LanguageHandler, &dispatch.HandlerData ); + if (status != STATUS_SUCCESS) return status; + got_info = TRUE; + } +#ifdef HAVE_LIBUNWIND_H + else + { + status = libunwind_virtual_unwind( dispatch.ControlPc, &got_info, &dispatch.EstablisherFrame, &context, + &dispatch.LanguageHandler, &dispatch.HandlerData ); + if (status != STATUS_SUCCESS) return i; + } +#endif + + if (got_info) + { + dispatch.FunctionEntry = NULL; + goto unwind_done; + } + } + else WARN( "exception data not found in %s\n", debugstr_w(module->BaseDllName.Buffer) ); + + context.Rip = *(ULONG64 *)context.Rsp; + context.Rsp = context.Rsp + sizeof(ULONG64); + dispatch.EstablisherFrame = context.Rsp; + + unwind_done: + if (!dispatch.EstablisherFrame) break; + + if ((dispatch.EstablisherFrame & 7) || + dispatch.EstablisherFrame < (ULONG64)NtCurrentTeb()->Tib.StackLimit || + dispatch.EstablisherFrame > (ULONG64)NtCurrentTeb()->Tib.StackBase) + { + ERR( "invalid frame %lx (%p-%p)\n", dispatch.EstablisherFrame, + NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase ); + break; + } + + if (context.Rsp == (ULONG64)NtCurrentTeb()->Tib.StackBase) break; + + if (i >= skip) buffer[num_entries++] = (void *)context.Rip; + } + if (hash && num_entries > 0) *hash = hash_pointers( buffer, num_entries ); + TRACE( "captured %hu frames\n", num_entries ); + return num_entries; }
1
0
0
0
Martin Storsjo : msvcrt: Provide the fmal function using the existing fma implementation.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: 1010857a00298969c6ad61ffb231a558180d406e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1010857a00298969c6ad61ff…
Author: Martin Storsjo <martin(a)martin.st> Date: Wed Jul 31 00:08:50 2019 +0300 msvcrt: Provide the fmal function using the existing fma implementation. Signed-off-by: Martin Storsjo <martin(a)martin.st> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec index bc281ca..9eb3059 100644 --- a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec +++ b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec @@ -243,7 +243,7 @@ @ cdecl -arch=arm,x86_64,arm64 floorf(float) ucrtbase.floorf @ cdecl fma(double double double) ucrtbase.fma @ cdecl fmaf(float float float) ucrtbase.fmaf -@ stub fmal +@ cdecl fmal(double double double) ucrtbase.fmal @ cdecl fmax(double double) ucrtbase.fmax @ cdecl fmaxf(float float) ucrtbase.fmaxf @ cdecl fmaxl(double double) ucrtbase.fmaxl diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index dc887b7..26d6983 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2166,7 +2166,7 @@ @ cdecl -arch=arm,x86_64,arm64 floorf(float) MSVCRT_floorf @ cdecl fma(double double double) MSVCRT_fma @ cdecl fmaf(float float float) MSVCRT_fmaf -@ stub fmal +@ cdecl fmal(double double double) MSVCRT_fma @ cdecl fmax(double double) MSVCR120_fmax @ cdecl fmaxf(float float) MSVCR120_fmaxf @ cdecl fmaxl(double double) MSVCR120_fmax diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index c56d1a9..3ca90c3 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1832,7 +1832,7 @@ @ cdecl -arch=arm,x86_64,arm64 floorf(float) msvcr120.floorf @ cdecl fma(double double double) msvcr120.fma @ cdecl fmaf(float float float) msvcr120.fmaf -@ stub fmal +@ cdecl fmal(double double double) msvcr120.fmal @ cdecl fmax(double double) msvcr120.fmax @ cdecl fmaxf(float float) msvcr120.fmaxf @ cdecl fmaxl(double double) msvcr120.fmaxl diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index e290c14..6609683 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2307,7 +2307,7 @@ @ cdecl -arch=arm,x86_64,arm64 floorf(float) MSVCRT_floorf @ cdecl fma(double double double) MSVCRT_fma @ cdecl fmaf(float float float) MSVCRT_fmaf -@ stub fmal +@ cdecl fmal(double double double) MSVCRT_fma @ cdecl fmax(double double) MSVCR120_fmax @ cdecl fmaxf(float float) MSVCR120_fmaxf @ cdecl fmaxl(double double) MSVCR120_fmax
1
0
0
0
Martin Storsjo : msvcrt: Provide the fmaf function on i386.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: dec4c99ae7d62cc2ceb98c4f60ec05ec2072a3c2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dec4c99ae7d62cc2ceb98c4f…
Author: Martin Storsjo <martin(a)martin.st> Date: Wed Jul 31 00:08:49 2019 +0300 msvcrt: Provide the fmaf function on i386. This is one of the new -f suffixed C99 math functions that actually are available on all architectures, even on i386. Signed-off-by: Martin Storsjo <martin(a)martin.st> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-crt-math-l1-1-0.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcrt/math.c | 32 +++++++++++----------- dlls/ucrtbase/ucrtbase.spec | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec index 3a5991f..bc281ca 100644 --- a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec +++ b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec @@ -242,7 +242,7 @@ @ cdecl floor(double) ucrtbase.floor @ cdecl -arch=arm,x86_64,arm64 floorf(float) ucrtbase.floorf @ cdecl fma(double double double) ucrtbase.fma -@ cdecl -arch=arm,x86_64,arm64 fmaf(float float float) ucrtbase.fmaf +@ cdecl fmaf(float float float) ucrtbase.fmaf @ stub fmal @ cdecl fmax(double double) ucrtbase.fmax @ cdecl fmaxf(float float) ucrtbase.fmaxf diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 9707211..dc887b7 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2165,7 +2165,7 @@ @ cdecl floor(double) MSVCRT_floor @ cdecl -arch=arm,x86_64,arm64 floorf(float) MSVCRT_floorf @ cdecl fma(double double double) MSVCRT_fma -@ cdecl -arch=arm,x86_64,arm64 fmaf(float float float) MSVCRT_fmaf +@ cdecl fmaf(float float float) MSVCRT_fmaf @ stub fmal @ cdecl fmax(double double) MSVCR120_fmax @ cdecl fmaxf(float float) MSVCR120_fmaxf diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 9b7727e..c56d1a9 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1831,7 +1831,7 @@ @ cdecl floor(double) msvcr120.floor @ cdecl -arch=arm,x86_64,arm64 floorf(float) msvcr120.floorf @ cdecl fma(double double double) msvcr120.fma -@ cdecl -arch=arm,x86_64,arm64 fmaf(float float float) msvcr120.fmaf +@ cdecl fmaf(float float float) msvcr120.fmaf @ stub fmal @ cdecl fmax(double double) msvcr120.fmax @ cdecl fmaxf(float float) msvcr120.fmaxf diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 63744e3..c29539e 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -388,22 +388,6 @@ float CDECL MSVCRT_floorf( float x ) } /********************************************************************* - * fmaf (MSVCRT.@) - */ -float CDECL MSVCRT_fmaf( float x, float y, float z ) -{ -#ifdef HAVE_FMAF - float w = fmaf(x, y, z); -#else - float w = x * y + z; -#endif - if ((isinf(x) && y == 0) || (x == 0 && isinf(y))) *MSVCRT__errno() = MSVCRT_EDOM; - else if (isinf(x) && isinf(z) && x != z) *MSVCRT__errno() = MSVCRT_EDOM; - else if (isinf(y) && isinf(z) && y != z) *MSVCRT__errno() = MSVCRT_EDOM; - return w; -} - -/********************************************************************* * frexpf (MSVCRT.@) */ float CDECL MSVCRT_frexpf( float x, int *exp ) @@ -896,6 +880,22 @@ double CDECL MSVCRT_fma( double x, double y, double z ) } /********************************************************************* + * fmaf (MSVCRT.@) + */ +float CDECL MSVCRT_fmaf( float x, float y, float z ) +{ +#ifdef HAVE_FMAF + float w = fmaf(x, y, z); +#else + float w = x * y + z; +#endif + if ((isinf(x) && y == 0) || (x == 0 && isinf(y))) *MSVCRT__errno() = MSVCRT_EDOM; + else if (isinf(x) && isinf(z) && x != z) *MSVCRT__errno() = MSVCRT_EDOM; + else if (isinf(y) && isinf(z) && y != z) *MSVCRT__errno() = MSVCRT_EDOM; + return w; +} + +/********************************************************************* * fabs (MSVCRT.@) */ double CDECL MSVCRT_fabs( double x ) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 567f200..e290c14 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2306,7 +2306,7 @@ @ cdecl floor(double) MSVCRT_floor @ cdecl -arch=arm,x86_64,arm64 floorf(float) MSVCRT_floorf @ cdecl fma(double double double) MSVCRT_fma -@ cdecl -arch=arm,x86_64,arm64 fmaf(float float float) MSVCRT_fmaf +@ cdecl fmaf(float float float) MSVCRT_fmaf @ stub fmal @ cdecl fmax(double double) MSVCR120_fmax @ cdecl fmaxf(float float) MSVCR120_fmaxf
1
0
0
0
Damjan Jovanovic : ws2_32: Avoid data corruption of WSAPROTOCOL_INFO in ws_protocol_info().
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: c722d819eac5987bd0659c3e9b9fe2f4392cb501 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c722d819eac5987bd0659c3e…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Thu Aug 1 06:11:32 2019 +0200 ws2_32: Avoid data corruption of WSAPROTOCOL_INFO in ws_protocol_info(). WS_EnterSingleProtocol[A/W]() fills WSAPROTOCOL_INFO with zeroes, ovewriting what was already there, so in ws_protocol_info(), populate the address family, socket type and protocol only AFTER calling it. Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 16 +++++++++++----- dlls/ws2_32/tests/sock.c | 5 ++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 0034787..d82172a 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2328,6 +2328,9 @@ static INT WS_EnumProtocols( BOOL unicode, const INT *protocols, LPWSAPROTOCOL_I static BOOL ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, int *size) { NTSTATUS status; + int address_family; + int socket_type; + int protocol; *size = unicode ? sizeof(WSAPROTOCOL_INFOW) : sizeof(WSAPROTOCOL_INFOA); memset(buffer, 0, *size); @@ -2338,9 +2341,9 @@ static BOOL ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, i status = wine_server_call( req ); if (!status) { - buffer->iAddressFamily = convert_af_u2w(reply->family); - buffer->iSocketType = convert_socktype_u2w(reply->type); - buffer->iProtocol = convert_proto_u2w(reply->protocol); + address_family = convert_af_u2w(reply->family); + socket_type = convert_socktype_u2w(reply->type); + protocol = convert_proto_u2w(reply->protocol); } } SERVER_END_REQ; @@ -2353,9 +2356,12 @@ static BOOL ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, i } if (unicode) - WS_EnterSingleProtocolW( buffer->iProtocol, buffer); + WS_EnterSingleProtocolW( protocol, buffer); else - WS_EnterSingleProtocolA( buffer->iProtocol, (WSAPROTOCOL_INFOA *)buffer); + WS_EnterSingleProtocolA( protocol, (WSAPROTOCOL_INFOA *)buffer); + buffer->iAddressFamily = address_family; + buffer->iSocketType = socket_type; + buffer->iProtocol = protocol; return TRUE; } diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 03f4e68..e97cd38 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1668,9 +1668,8 @@ todo_wine "SO_PROTOCOL_INFO[A/W] comparison failed\n"); /* Remove IF when WSAEnumProtocols support IPV6 data */ - todo_wine_if (prottest[i].family == AF_INET6) - ok(infoA.iAddressFamily == prottest[i].family, "socket family invalid, expected %d received %d\n", - prottest[i].family, infoA.iAddressFamily); + ok(infoA.iAddressFamily == prottest[i].family, "socket family invalid, expected %d received %d\n", + prottest[i].family, infoA.iAddressFamily); ok(infoA.iSocketType == prottest[i].type, "socket type invalid, expected %d received %d\n", prottest[i].type, infoA.iSocketType); ok(infoA.iProtocol == prottest[i].proto, "socket protocol invalid, expected %d received %d\n",
1
0
0
0
Damjan Jovanovic : ws2_32: Implement IP_PKTINFO on *BSDs, which only have IP_RECVDSTADDR instead.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: 0645e6c959a8b9e32387101fbe5b9f14d5a31807 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0645e6c959a8b9e32387101f…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Thu Aug 1 06:11:28 2019 +0200 ws2_32: Implement IP_PKTINFO on *BSDs, which only have IP_RECVDSTADDR instead. Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index a3c3780..0034787 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -698,8 +698,10 @@ static const int ws_ip_map[][2] = #endif MAP_OPTION( IP_TOS ), MAP_OPTION( IP_TTL ), -#ifdef IP_PKTINFO +#if defined(IP_PKTINFO) MAP_OPTION( IP_PKTINFO ), +#elif defined(IP_RECVDSTADDR) + { WS_IP_PKTINFO, IP_RECVDSTADDR }, #endif #ifdef IP_UNICAST_IF MAP_OPTION( IP_UNICAST_IF ), @@ -819,7 +821,7 @@ static const int ws_poll_map[][2] = static const char magic_loopback_addr[] = {127, 12, 34, 56}; #ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS -#ifdef IP_PKTINFO +#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) static inline WSACMSGHDR *fill_control_message(int level, int type, WSACMSGHDR *current, ULONG *maxsize, void *data, int len) { ULONG msgsize = sizeof(WSACMSGHDR) + WSA_CMSG_ALIGN(len); @@ -837,11 +839,11 @@ static inline WSACMSGHDR *fill_control_message(int level, int type, WSACMSGHDR * /* Return the pointer to where next entry should go */ return (WSACMSGHDR *) (ptr + WSA_CMSG_ALIGN(len)); } -#endif /* IP_PKTINFO */ +#endif /* defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) */ static inline int convert_control_headers(struct msghdr *hdr, WSABUF *control) { -#ifdef IP_PKTINFO +#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) WSACMSGHDR *cmsg_win = (WSACMSGHDR *) control->buf, *ptr; ULONG ctlsize = control->len; struct cmsghdr *cmsg_unix; @@ -855,6 +857,7 @@ static inline int convert_control_headers(struct msghdr *hdr, WSABUF *control) case IPPROTO_IP: switch(cmsg_unix->cmsg_type) { +#if defined(IP_PKTINFO) case IP_PKTINFO: { /* Convert the Unix IP_PKTINFO structure to the Windows version */ @@ -867,6 +870,19 @@ static inline int convert_control_headers(struct msghdr *hdr, WSABUF *control) (void*)&data_win, sizeof(data_win)); if (!ptr) goto error; } break; +#elif defined(IP_RECVDSTADDR) + case IP_RECVDSTADDR: + { + struct in_addr *addr_unix = (struct in_addr *) CMSG_DATA(cmsg_unix); + struct WS_in_pktinfo data_win; + + memcpy(&data_win.ipi_addr, &addr_unix->s_addr, 4); /* 4 bytes = 32 address bits */ + data_win.ipi_ifindex = 0; /* FIXME */ + ptr = fill_control_message(WS_IPPROTO_IP, WS_IP_PKTINFO, ptr, &ctlsize, + (void*)&data_win, sizeof(data_win)); + if (!ptr) goto error; + } break; +#endif /* IP_PKTINFO */ default: FIXME("Unhandled IPPROTO_IP message header type %d\n", cmsg_unix->cmsg_type); break; @@ -884,10 +900,10 @@ static inline int convert_control_headers(struct msghdr *hdr, WSABUF *control) error: control->len = 0; return 0; -#else /* IP_PKTINFO */ +#else /* defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) */ control->len = 0; return 1; -#endif /* IP_PKTINFO */ +#endif /* defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) */ } #endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ @@ -4310,7 +4326,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, case WS_IP_MULTICAST_LOOP: case WS_IP_MULTICAST_TTL: case WS_IP_OPTIONS: -#ifdef IP_PKTINFO +#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) case WS_IP_PKTINFO: #endif case WS_IP_TOS: @@ -5998,7 +6014,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, case WS_IP_MULTICAST_LOOP: case WS_IP_MULTICAST_TTL: case WS_IP_OPTIONS: -#ifdef IP_PKTINFO +#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) case WS_IP_PKTINFO: #endif case WS_IP_TOS:
1
0
0
0
Damjan Jovanovic : ws2_32: WSARecvMsg allows a NULL control buffer when no control messages arrive.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: aa2c84a9db064a16598c4198c435e2e5896dd059 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa2c84a9db064a16598c4198…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Thu Aug 1 06:11:21 2019 +0200 ws2_32: WSARecvMsg allows a NULL control buffer when no control messages arrive. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=43286
Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 8 +++++--- dlls/ws2_32/tests/sock.c | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 3b78f0d..a3c3780 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -878,10 +878,12 @@ static inline int convert_control_headers(struct msghdr *hdr, WSABUF *control) } } -error: /* Set the length of the returned control headers */ - control->len = (ptr == NULL ? 0 : (char*)ptr - (char*)cmsg_win); - return (ptr != NULL); + control->len = (char*)ptr - (char*)cmsg_win; + return 1; +error: + control->len = 0; + return 0; #else /* IP_PKTINFO */ control->len = 0; return 1; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 0c7f736..03f4e68 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -2108,8 +2108,6 @@ static void test_ip_pktinfo(void) /* Setup the server side socket */ rc=bind(s1, (struct sockaddr*)&s1addr, sizeof(s1addr)); ok(rc != SOCKET_ERROR, "bind() failed error: %d\n", WSAGetLastError()); - rc=setsockopt(s1, IPPROTO_IP, IP_PKTINFO, (const char*)&yes, sizeof(yes)); - ok(rc == 0, "failed to set IPPROTO_IP flag IP_PKTINFO!\n"); /* Build "client" side socket */ addrlen = sizeof(s2addr); @@ -2133,6 +2131,21 @@ static void test_ip_pktinfo(void) err=WSAGetLastError(); ok(rc == SOCKET_ERROR && err == WSAEFAULT, "WSARecvMsg() failed error: %d (ret = %d)\n", err, rc); + /* Test that when no control data arrives, a 0-length NULL-valued control buffer should succeed */ + SetLastError(0xdeadbeef); + rc=sendto(s2, msg, sizeof(msg), 0, (struct sockaddr*)&s2addr, sizeof(s2addr)); + ok(rc == sizeof(msg), "sendto() failed error: %d\n", WSAGetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected 0, got %d\n", GetLastError()); + hdr.Control.buf = NULL; + hdr.Control.len = 0; + rc=pWSARecvMsg(s1, &hdr, &dwSize, NULL, NULL); + ok(rc == 0, "WSARecvMsg() failed error: %d\n", WSAGetLastError()); + hdr.Control.buf = pktbuf; + + /* Now start IP_PKTINFO for future tests */ + rc=setsockopt(s1, IPPROTO_IP, IP_PKTINFO, (const char*)&yes, sizeof(yes)); + ok(rc == 0, "failed to set IPPROTO_IP flag IP_PKTINFO!\n"); + /* * Send a packet from the client to the server and test for specifying * a short control header.
1
0
0
0
Alistair Leslie-Hughes : include: Added missing Edit_* defines.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: b943b8c347493a6d28cec2d6aa8c65098454f332 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b943b8c347493a6d28cec2d6…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Aug 1 06:21:14 2019 +0000 include: Added missing Edit_* defines. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/commctrl.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/commctrl.h b/include/commctrl.h index 77b22b4..0ad5614 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -5336,6 +5336,14 @@ typedef struct _tagEDITBALLOONTIP (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, (WPARAM)(drawfocused), (LPARAM)(text)) #define Edit_GetCueBannerText(hwnd, buff, buff_size) \ (BOOL)SNDMSG((hwnd), EM_GETCUEBANNER, (WPARAM)(buff), (LPARAM)(buff_size)) +#define Edit_SetHilite(hwnd, start, end) \ + SNDMSG((hwnd), EM_SETHILITE, start, end) +#define Edit_GetHilite(hwnd) \ + ((DWORD)SNDMSG((hwnd), EM_GETHILITE, 0L, 0L)) +#define Edit_ShowBalloonTip(hwnd, tip) \ + (BOOL)SNDMSG((hwnd), EM_SHOWBALLOONTIP, 0, (LPARAM)(tip)) +#define Edit_HideBalloonTip(hwnd) \ + (BOOL)SNDMSG((hwnd), EM_HIDEBALLOONTIP, 0, 0) /************************************************************************** * Listbox control
1
0
0
0
Alistair Leslie-Hughes : include: Added missing ComboBox_* defines.
by Alexandre Julliard
01 Aug '19
01 Aug '19
Module: wine Branch: master Commit: 6bd804a4591335c101003072baa248a81928b240 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6bd804a4591335c101003072…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Aug 1 06:21:13 2019 +0000 include: Added missing ComboBox_* defines. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/commctrl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/commctrl.h b/include/commctrl.h index f21d930..77b22b4 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -5295,6 +5295,10 @@ static const WCHAR WC_COMBOBOXW[] = { 'C','o','m','b','o','B','o','x',0 }; ((INT)SNDMSG((hwnd), CB_GETMINVISIBLE, 0, 0)) #define ComboBox_SetMinVisible(hwnd, count) \ ((BOOL)SNDMSG((hwnd), CB_SETMINVISIBLE, (WPARAM)(count), 0)) +#define ComboBox_SetCueBannerText(hwnd, text) \ + ((BOOL)SNDMSG((hwnd), CB_SETCUEBANNER, 0, (LPARAM)(text))) +#define ComboBox_GetCueBannerText(hwnd, text, cnt) \ + ((BOOL)SNDMSG((hwnd), CB_GETCUEBANNER, (WPARAM)(text), (LPARAM)(cnt))) /************************************************************************** * Edit control
1
0
0
0
← Newer
1
...
65
66
67
68
69
70
71
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
Results per page:
10
25
50
100
200