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
May
April
March
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
June 2021
----- 2025 -----
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
811 discussions
Start a n
N
ew thread
Zebediah Figura : ws2_32: Fix the indentation of SIO_ROUTING_INTERFACE_QUERY.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: 306b2441076a67a057c0217c780d1a4eea1ce624 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=306b2441076a67a057c0217c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Jun 9 00:04:45 2021 -0500 ws2_32: Fix the indentation of SIO_ROUTING_INTERFACE_QUERY. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 115 ++++++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 57 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 1b3ad2fa6d0..7493b9e9f87 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3428,63 +3428,64 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID return ret ? -1 : 0; } - case WS_SIO_ROUTING_INTERFACE_QUERY: - { - struct WS_sockaddr *daddr = (struct WS_sockaddr *)in_buff; - struct WS_sockaddr_in *daddr_in = (struct WS_sockaddr_in *)daddr; - struct WS_sockaddr_in *saddr_in = out_buff; - MIB_IPFORWARDROW row; - PMIB_IPADDRTABLE ipAddrTable = NULL; - DWORD size, i, found_index; - - TRACE("-> WS_SIO_ROUTING_INTERFACE_QUERY request\n"); - - if (!in_buff || in_size < sizeof(struct WS_sockaddr) || - !out_buff || out_size < sizeof(struct WS_sockaddr_in)) - { - SetLastError(WSAEFAULT); - return SOCKET_ERROR; - } - if (daddr->sa_family != WS_AF_INET) - { - FIXME("unsupported address family %d\n", daddr->sa_family); - status = WSAEAFNOSUPPORT; - break; - } - if (GetBestRoute(daddr_in->sin_addr.S_un.S_addr, 0, &row) != NOERROR || - GetIpAddrTable(NULL, &size, FALSE) != ERROR_INSUFFICIENT_BUFFER) - { - status = WSAEFAULT; - break; - } - ipAddrTable = HeapAlloc(GetProcessHeap(), 0, size); - if (GetIpAddrTable(ipAddrTable, &size, FALSE)) - { - HeapFree(GetProcessHeap(), 0, ipAddrTable); - status = WSAEFAULT; - break; - } - for (i = 0, found_index = ipAddrTable->dwNumEntries; - i < ipAddrTable->dwNumEntries; i++) - { - if (ipAddrTable->table[i].dwIndex == row.dwForwardIfIndex) - found_index = i; - } - if (found_index == ipAddrTable->dwNumEntries) - { - ERR("no matching IP address for interface %d\n", - row.dwForwardIfIndex); - HeapFree(GetProcessHeap(), 0, ipAddrTable); - status = WSAEFAULT; - break; - } - saddr_in->sin_family = WS_AF_INET; - saddr_in->sin_addr.S_un.S_addr = ipAddrTable->table[found_index].dwAddr; - saddr_in->sin_port = 0; - total = sizeof(struct WS_sockaddr_in); - HeapFree(GetProcessHeap(), 0, ipAddrTable); - break; - } + case WS_SIO_ROUTING_INTERFACE_QUERY: + { + struct WS_sockaddr *daddr = (struct WS_sockaddr *)in_buff; + struct WS_sockaddr_in *daddr_in = (struct WS_sockaddr_in *)daddr; + struct WS_sockaddr_in *saddr_in = out_buff; + MIB_IPFORWARDROW row; + PMIB_IPADDRTABLE ipAddrTable = NULL; + DWORD size, i, found_index; + + TRACE( "-> WS_SIO_ROUTING_INTERFACE_QUERY request\n" ); + + if (!in_buff || in_size < sizeof(struct WS_sockaddr) || + !out_buff || out_size < sizeof(struct WS_sockaddr_in)) + { + SetLastError( WSAEFAULT ); + return -1; + } + if (daddr->sa_family != WS_AF_INET) + { + FIXME("unsupported address family %d\n", daddr->sa_family); + status = WSAEAFNOSUPPORT; + break; + } + if (GetBestRoute( daddr_in->sin_addr.S_un.S_addr, 0, &row ) != NOERROR || + GetIpAddrTable( NULL, &size, FALSE ) != ERROR_INSUFFICIENT_BUFFER) + { + status = WSAEFAULT; + break; + } + ipAddrTable = HeapAlloc( GetProcessHeap(), 0, size ); + if (GetIpAddrTable( ipAddrTable, &size, FALSE )) + { + HeapFree( GetProcessHeap(), 0, ipAddrTable ); + status = WSAEFAULT; + break; + } + for (i = 0, found_index = ipAddrTable->dwNumEntries; + i < ipAddrTable->dwNumEntries; i++) + { + if (ipAddrTable->table[i].dwIndex == row.dwForwardIfIndex) + found_index = i; + } + if (found_index == ipAddrTable->dwNumEntries) + { + ERR("no matching IP address for interface %d\n", + row.dwForwardIfIndex); + HeapFree( GetProcessHeap(), 0, ipAddrTable ); + status = WSAEFAULT; + break; + } + saddr_in->sin_family = WS_AF_INET; + saddr_in->sin_addr.S_un.S_addr = ipAddrTable->table[found_index].dwAddr; + saddr_in->sin_port = 0; + total = sizeof(struct WS_sockaddr_in); + HeapFree( GetProcessHeap(), 0, ipAddrTable ); + break; + } + case WS_SIO_SET_COMPATIBILITY_MODE: TRACE("WS_SIO_SET_COMPATIBILITY_MODE ignored\n"); status = WSAEOPNOTSUPP;
1
0
0
0
Nikolay Sivov : dxva2/tests: Remove a test failing on system with hw dxva devices support.
by Alexandre Julliard
09 Jun '21
09 Jun '21
Module: wine Branch: master Commit: 37c6790fb75ea5de61a83bd5441c2a7a2d624184 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=37c6790fb75ea5de61a83bd5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 9 08:59:52 2021 +0300 dxva2/tests: Remove a test failing on system with hw dxva devices support. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dxva2/tests/dxva2.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/dxva2/tests/dxva2.c b/dlls/dxva2/tests/dxva2.c index 80749b81f12..4b09e93e87a 100644 --- a/dlls/dxva2/tests/dxva2.c +++ b/dlls/dxva2/tests/dxva2.c @@ -378,9 +378,6 @@ static void test_device_manager(void) hr = IDirectXVideoProcessorService_GetVideoProcessorRenderTargets(proc_service, &DXVA2_VideoProcSoftwareDevice, &video_desc, &count, &formats); ok(hr == E_FAIL, "Unexpected hr %#x, format %d.\n", hr, rt_unsupported_formats[i]); - - hr = IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids(proc_service, &video_desc, &count, &guids); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); } IDirectXVideoProcessorService_Release(proc_service);
1
0
0
0
Piotr Caban : msvcrt: Import fmaf implementation from musl.
by Alexandre Julliard
08 Jun '21
08 Jun '21
Module: wine Branch: master Commit: 7fdb78e80bf3a8ea6d165d320c0db76192325069 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7fdb78e80bf3a8ea6d165d32…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 8 21:19:39 2021 +0200 msvcrt: Import fmaf implementation from musl. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 3 +-- configure.ac | 3 +-- dlls/msvcrt/math.c | 39 ++++++++++++++++++++++++++++++++++----- dlls/msvcrt/unixlib.c | 13 ------------- dlls/msvcrt/unixlib.h | 1 - include/config.h.in | 3 --- 6 files changed, 36 insertions(+), 26 deletions(-) diff --git a/configure b/configure index 6a250f3728e..06f18a9efe0 100755 --- a/configure +++ b/configure @@ -19621,8 +19621,7 @@ fi for ac_func in \ exp2 \ - exp2f \ - fmaf + exp2f do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` diff --git a/configure.ac b/configure.ac index d4c1896fa96..98404b666d5 100644 --- a/configure.ac +++ b/configure.ac @@ -2660,8 +2660,7 @@ fi AC_CHECK_FUNCS(\ exp2 \ - exp2f \ - fmaf + exp2f ) LIBS="$ac_save_LIBS" diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index a054f561a63..4d7cc6ab727 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -4127,14 +4127,43 @@ double CDECL fma( double x, double y, double z ) /********************************************************************* * fmaf (MSVCRT.@) + * + * Copied from musl: src/math/fmaf.c */ float CDECL fmaf( float x, float y, float z ) { - float w = unix_funcs->fmaf(x, y, z); - if ((isinf(x) && y == 0) || (x == 0 && isinf(y))) *_errno() = EDOM; - else if (isinf(x) && isinf(z) && x != z) *_errno() = EDOM; - else if (isinf(y) && isinf(z) && y != z) *_errno() = EDOM; - return w; + union { double f; UINT64 i; } u; + double xy, adjust; + int e; + + xy = (double)x * y; + u.f = xy + z; + e = u.i>>52 & 0x7ff; + /* Common case: The double precision result is fine. */ + if ((u.i & 0x1fffffff) != 0x10000000 || /* not a halfway case */ + e == 0x7ff || /* NaN */ + (u.f - xy == z && u.f - z == xy) || /* exact */ + (_controlfp(0, 0) & _MCW_RC) != _RC_NEAR) /* not round-to-nearest */ + { + if (!isnan(x) && !isnan(y) && !isnan(z) && isnan(u.f)) *_errno() = EDOM; + + /* underflow may not be raised correctly, example: + fmaf(0x1p-120f, 0x1p-120f, 0x1p-149f) */ + if (e < 0x3ff-126 && e >= 0x3ff-149 && _statusfp() & _SW_INEXACT) + fp_barrierf((float)u.f * (float)u.f); + return u.f; + } + + /* + * If result is inexact, and exactly halfway between two float values, + * we need to adjust the low-order bit in the direction of the error. + */ + _controlfp(_RC_CHOP, _MCW_RC); + adjust = fp_barrier(xy + z); + _controlfp(_RC_NEAR, _MCW_RC); + if (u.f == adjust) + u.i++; + return u.f; } /********************************************************************* diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c index a01b227e428..91c6bc4c2f0 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c @@ -82,18 +82,6 @@ static float CDECL unix_exp2f( float x ) #endif } -/********************************************************************* - * fmaf - */ -static float CDECL unix_fmaf( float x, float y, float z ) -{ -#ifdef HAVE_FMAF - return fmaf(x, y, z); -#else - return x * y + z; -#endif -} - /********************************************************************* * pow */ @@ -116,7 +104,6 @@ static const struct unix_funcs funcs = unix_expf, unix_exp2, unix_exp2f, - unix_fmaf, unix_pow, unix_powf, }; diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h index b39f56c31cc..b7afa6cdf8b 100644 --- a/dlls/msvcrt/unixlib.h +++ b/dlls/msvcrt/unixlib.h @@ -27,7 +27,6 @@ struct unix_funcs float (CDECL *expf)(float x); double (CDECL *exp2)(double x); float (CDECL *exp2f)(float x); - float (CDECL *fmaf)(float x, float y, float z); double (CDECL *pow)(double x, double y); float (CDECL *powf)(float x, float y); }; diff --git a/include/config.h.in b/include/config.h.in index be6dfb35ab3..09bcdd70983 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -120,9 +120,6 @@ /* Define to 1 if you have the <float.h> header file. */ #undef HAVE_FLOAT_H -/* Define to 1 if you have the `fmaf' function. */ -#undef HAVE_FMAF - /* Define to 1 if you have the `fnmatch' function. */ #undef HAVE_FNMATCH
1
0
0
0
Piotr Caban : msvcrt: Import tgammaf implementation from musl.
by Alexandre Julliard
08 Jun '21
08 Jun '21
Module: wine Branch: master Commit: f4c88b3e9c56f9960a0d3568d10b5c26ad79346f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f4c88b3e9c56f9960a0d3568…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 8 21:19:34 2021 +0200 msvcrt: Import tgammaf implementation from musl. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 3 +-- configure.ac | 3 +-- dlls/msvcrt/math.c | 4 +++- dlls/msvcrt/unixlib.c | 14 -------------- dlls/msvcrt/unixlib.h | 1 - include/config.h.in | 3 --- 6 files changed, 5 insertions(+), 23 deletions(-) diff --git a/configure b/configure index c0d24695456..6a250f3728e 100755 --- a/configure +++ b/configure @@ -19622,8 +19622,7 @@ fi for ac_func in \ exp2 \ exp2f \ - fmaf \ - tgammaf + fmaf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` diff --git a/configure.ac b/configure.ac index 748913f7216..d4c1896fa96 100644 --- a/configure.ac +++ b/configure.ac @@ -2661,8 +2661,7 @@ fi AC_CHECK_FUNCS(\ exp2 \ exp2f \ - fmaf \ - tgammaf + fmaf ) LIBS="$ac_save_LIBS" diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index d419c34a947..a054f561a63 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -9171,10 +9171,12 @@ double CDECL tgamma(double x) /********************************************************************* * tgammaf (MSVCR120.@) + * + * Copied from musl: src/math/tgammaf.c */ float CDECL tgammaf(float x) { - return unix_funcs->tgammaf( x ); + return tgamma(x); } /********************************************************************* diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c index 26af9812f88..a01b227e428 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c @@ -110,19 +110,6 @@ static float CDECL unix_powf( float x, float y ) return powf( x, y ); } -/********************************************************************* - * tgammaf - */ -static float CDECL unix_tgammaf(float x) -{ -#ifdef HAVE_TGAMMAF - return tgammaf(x); -#else - FIXME( "not implemented\n" ); - return 0; -#endif -} - static const struct unix_funcs funcs = { unix_exp, @@ -132,7 +119,6 @@ static const struct unix_funcs funcs = unix_fmaf, unix_pow, unix_powf, - unix_tgammaf, }; NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out ) diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h index f119a0a35d0..b39f56c31cc 100644 --- a/dlls/msvcrt/unixlib.h +++ b/dlls/msvcrt/unixlib.h @@ -30,7 +30,6 @@ struct unix_funcs float (CDECL *fmaf)(float x, float y, float z); double (CDECL *pow)(double x, double y); float (CDECL *powf)(float x, float y); - float (CDECL *tgammaf)(float x); }; #endif /* __UNIXLIB_H */ diff --git a/include/config.h.in b/include/config.h.in index aa74e710e06..be6dfb35ab3 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -929,9 +929,6 @@ /* Define to 1 if you have the <termios.h> header file. */ #undef HAVE_TERMIOS_H -/* Define to 1 if you have the `tgammaf' function. */ -#undef HAVE_TGAMMAF - /* Define to 1 if you have the `thr_kill2' function. */ #undef HAVE_THR_KILL2
1
0
0
0
Piotr Caban : msvcrt: Import tgamma implementation from musl.
by Alexandre Julliard
08 Jun '21
08 Jun '21
Module: wine Branch: master Commit: 16fa6b78460c83c08d28aa0a77d6077ea5010650 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=16fa6b78460c83c08d28aa0a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 8 21:19:27 2021 +0200 msvcrt: Import tgamma implementation from musl. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 1 - configure.ac | 1 - dlls/msvcrt/math.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++-- dlls/msvcrt/unixlib.c | 14 ------ dlls/msvcrt/unixlib.h | 1 - include/config.h.in | 3 -- 6 files changed, 118 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 9acc579ca11..c0d24695456 100755 --- a/configure +++ b/configure @@ -19623,7 +19623,6 @@ for ac_func in \ exp2 \ exp2f \ fmaf \ - tgamma \ tgammaf do : diff --git a/configure.ac b/configure.ac index bf7efa0690c..748913f7216 100644 --- a/configure.ac +++ b/configure.ac @@ -2662,7 +2662,6 @@ AC_CHECK_FUNCS(\ exp2 \ exp2f \ fmaf \ - tgamma \ tgammaf ) LIBS="$ac_save_LIBS" diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index a471f07f046..d419c34a947 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -8647,16 +8647,15 @@ end: /* sin(pi*x) assuming x > 2^-100, if sin(pi*x)==0 the sign is arbitrary */ static double sin_pi(double x) { - static const double pi = 3.14159265358979311600e+00; int n; /* spurious inexact if odd int */ x = 2.0 * (x * 0.5 - floor(x * 0.5)); /* x mod 2.0 */ - n = (int)(x * 4.0); + n = x * 4.0; n = (n + 1) / 2; x -= n * 0.5f; - x *= pi; + x *= M_PI; switch (n) { default: /* case 4: */ @@ -9047,12 +9046,127 @@ float CDECL lgammaf(float x) return r; } +static double tgamma_S(double x) +{ + static const double Snum[] = { + 23531376880.410759688572007674451636754734846804940, + 42919803642.649098768957899047001988850926355848959, + 35711959237.355668049440185451547166705960488635843, + 17921034426.037209699919755754458931112671403265390, + 6039542586.3520280050642916443072979210699388420708, + 1439720407.3117216736632230727949123939715485786772, + 248874557.86205415651146038641322942321632125127801, + 31426415.585400194380614231628318205362874684987640, + 2876370.6289353724412254090516208496135991145378768, + 186056.26539522349504029498971604569928220784236328, + 8071.6720023658162106380029022722506138218516325024, + 210.82427775157934587250973392071336271166969580291, + 2.5066282746310002701649081771338373386264310793408, + }; + static const double Sden[] = { + 0, 39916800, 120543840, 150917976, 105258076, 45995730, 13339535, + 2637558, 357423, 32670, 1925, 66, 1, + }; + + double num = 0, den = 0; + int i; + + /* to avoid overflow handle large x differently */ + if (x < 8) + for (i = ARRAY_SIZE(Snum) - 1; i >= 0; i--) { + num = num * x + Snum[i]; + den = den * x + Sden[i]; + } + else + for (i = 0; i < ARRAY_SIZE(Snum); i++) { + num = num / x + Snum[i]; + den = den / x + Sden[i]; + } + return num / den; +} + /********************************************************************* * tgamma (MSVCR120.@) + * + * Copied from musl: src/math/tgamma.c */ double CDECL tgamma(double x) { - return unix_funcs->tgamma( x ); + static const double gmhalf = 5.524680040776729583740234375; + static const double fact[] = { + 1, 1, 2, 6, 24, 120, 720, 5040.0, 40320.0, 362880.0, 3628800.0, 39916800.0, + 479001600.0, 6227020800.0, 87178291200.0, 1307674368000.0, 20922789888000.0, + 355687428096000.0, 6402373705728000.0, 121645100408832000.0, + 2432902008176640000.0, 51090942171709440000.0, 1124000727777607680000.0, + }; + + union {double f; UINT64 i;} u = {x}; + double absx, y, dy, z, r; + UINT32 ix = u.i >> 32 & 0x7fffffff; + int sign = u.i >> 63; + + /* special cases */ + if (ix >= 0x7ff00000) { + /* tgamma(nan)=nan, tgamma(inf)=inf, tgamma(-inf)=nan with invalid */ + if (u.i == 0xfff0000000000000ULL) + *_errno() = EDOM; + return x + INFINITY; + } + if (ix < (0x3ff - 54) << 20) { + /* |x| < 2^-54: tgamma(x) ~ 1/x, +-0 raises div-by-zero */ + if (x == 0.0) + *_errno() = ERANGE; + return 1 / x; + } + + /* integer arguments */ + /* raise inexact when non-integer */ + if (x == floor(x)) { + if (sign) { + *_errno() = EDOM; + return 0 / (x - x); + } + if (x <= ARRAY_SIZE(fact)) + return fact[(int)x - 1]; + } + + /* x >= 172: tgamma(x)=inf with overflow */ + /* x =< -184: tgamma(x)=+-0 with underflow */ + if (ix >= 0x40670000) { /* |x| >= 184 */ + *_errno() = ERANGE; + if (sign) { + fp_barrierf(0x1p-126 / x); + return 0; + } + x *= 0x1p1023; + return x; + } + + absx = sign ? -x : x; + + /* handle the error of x + g - 0.5 */ + y = absx + gmhalf; + if (absx > gmhalf) { + dy = y - absx; + dy -= gmhalf; + } else { + dy = y - gmhalf; + dy -= absx; + } + + z = absx - 0.5; + r = tgamma_S(absx) * exp(-y); + if (x < 0) { + /* reflection formula for negative x */ + /* sinpi(absx) is not 0, integers are already handled */ + r = -M_PI / (sin_pi(absx) * absx * r); + dy = -dy; + z = -z; + } + r += dy * (gmhalf + 0.5) * r / y; + z = pow(y, 0.5 * z); + y = r * z * z; + return y; } /********************************************************************* diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c index 012ec6f6b85..26af9812f88 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c @@ -110,19 +110,6 @@ static float CDECL unix_powf( float x, float y ) return powf( x, y ); } -/********************************************************************* - * tgamma - */ -static double CDECL unix_tgamma(double x) -{ -#ifdef HAVE_TGAMMA - return tgamma(x); -#else - FIXME( "not implemented\n" ); - return 0; -#endif -} - /********************************************************************* * tgammaf */ @@ -145,7 +132,6 @@ static const struct unix_funcs funcs = unix_fmaf, unix_pow, unix_powf, - unix_tgamma, unix_tgammaf, }; diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h index a9c569d6f63..f119a0a35d0 100644 --- a/dlls/msvcrt/unixlib.h +++ b/dlls/msvcrt/unixlib.h @@ -30,7 +30,6 @@ struct unix_funcs float (CDECL *fmaf)(float x, float y, float z); double (CDECL *pow)(double x, double y); float (CDECL *powf)(float x, float y); - double (CDECL *tgamma)(double x); float (CDECL *tgammaf)(float x); }; diff --git a/include/config.h.in b/include/config.h.in index 537dda5f68d..aa74e710e06 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -929,9 +929,6 @@ /* Define to 1 if you have the <termios.h> header file. */ #undef HAVE_TERMIOS_H -/* Define to 1 if you have the `tgamma' function. */ -#undef HAVE_TGAMMA - /* Define to 1 if you have the `tgammaf' function. */ #undef HAVE_TGAMMAF
1
0
0
0
Roman Pišl : ntdll: Allow loading of native libraries for Win16.
by Alexandre Julliard
08 Jun '21
08 Jun '21
Module: wine Branch: master Commit: a0425b9610a2925459141d466774fc10360833ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a0425b9610a2925459141d46…
Author: Roman Pišl <rpisl(a)seznam.cz> Date: Sat Jun 5 21:52:06 2021 +0200 ntdll: Allow loading of native libraries for Win16. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51224
Signed-off-by: Roman Pišl <rpisl(a)seznam.cz> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index f3a37d4e8a6..e19b62cdaaf 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2828,12 +2828,6 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, con status = STATUS_SUCCESS; goto done; } - /* 16-bit files can't be loaded from the prefix */ - if (libname[0] && libname[1] && !wcscmp( libname + wcslen(libname) - 2, L"16" )) - { - status = find_builtin_without_file( libname, nt_name, pwm, mapping, image_info, id ); - goto done; - } } } @@ -2842,6 +2836,10 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, con else if (!(status = RtlDosPathNameToNtPathName_U_WithStatus( libname, nt_name, NULL, NULL ))) status = open_dll_file( nt_name, pwm, mapping, image_info, id ); + /* 16-bit files can't be loaded from the prefix */ + if (status && libname[0] && libname[1] && !wcscmp( libname + wcslen(libname) - 2, L"16" ) && !contains_path( libname )) + status = find_builtin_without_file( libname, nt_name, pwm, mapping, image_info, id ); + if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) status = STATUS_INVALID_IMAGE_FORMAT; done:
1
0
0
0
Damjan Jovanovic : server: The owner of a securable object should have all the standard access rights.
by Alexandre Julliard
08 Jun '21
08 Jun '21
Module: wine Branch: master Commit: 31e984a09d6bb9ce774da9bee7e24eea2a379f75 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=31e984a09d6bb9ce774da9be…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Sun Jun 6 03:59:38 2021 +0200 server: The owner of a securable object should have all the standard access rights. Cygwin fork() fails in NtCreateSymbolicLinkObject(). We successfully create the link but then fail to alloc_handle() with STATUS_ACCESS_DENIED, because the requested access rights exceed what the owner is allowed. Allow it more. Thank you to Dmitry Timoshkov for debugging the security details from alloc_handle() onwards. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48891
Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/security.c | 19 +++++++++++++++++-- server/token.c | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index b3361795761..3f1fffda273 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1076,10 +1076,25 @@ todo_wine { SetLastError(0xdeadbeef); rc = AccessCheck(sd, token, DELETE, &mapping, &priv_set, &priv_set_len, &granted, &status); ok(rc, "AccessCheck error %d\n", GetLastError()); -todo_wine { ok(status == 1, "expected 1, got %d\n", status); ok(granted == DELETE, "expected DELETE, got %#x\n", granted); -} + + granted = 0xdeadbeef; + status = 0xdeadbeef; + SetLastError(0xdeadbeef); + rc = AccessCheck(sd, token, WRITE_OWNER, &mapping, &priv_set, &priv_set_len, &granted, &status); + ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(status == 1, "expected 1, got %d\n", status); + ok(granted == WRITE_OWNER, "expected WRITE_OWNER, got %#x\n", granted); + + granted = 0xdeadbeef; + status = 0xdeadbeef; + SetLastError(0xdeadbeef); + rc = AccessCheck(sd, token, SYNCHRONIZE, &mapping, &priv_set, &priv_set_len, &granted, &status); + ok(rc, "AccessCheck error %d\n", GetLastError()); + ok(status == 1, "expected 1, got %d\n", status); + ok(granted == SYNCHRONIZE, "expected SYNCHRONIZE, got %#x\n", granted); + granted = 0xdeadbeef; status = 0xdeadbeef; SetLastError(0xdeadbeef); diff --git a/server/token.c b/server/token.c index 089f1c5c61e..ad5d7cda323 100644 --- a/server/token.c +++ b/server/token.c @@ -1113,7 +1113,7 @@ static unsigned int token_access_check( struct token *token, * determined here. */ if (token_sid_present( token, owner, FALSE )) { - current_access |= (READ_CONTROL | WRITE_DAC); + current_access |= (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE); if (desired_access == current_access) { *granted_access = current_access;
1
0
0
0
Torge Matthies : winex11.drv: Avoid race condition in X11 error handling.
by Alexandre Julliard
08 Jun '21
08 Jun '21
Module: wine Branch: master Commit: 2e4bfa642e31f9690365d6daf42ef87a74331cf7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2e4bfa642e31f9690365d6da…
Author: Torge Matthies <openglfreak(a)googlemail.com> Date: Mon Jun 7 01:05:16 2021 +0200 winex11.drv: Avoid race condition in X11 error handling. The err_callback* globals need to be protected from being overwritten before X11DRV_check_error is called, otherwise no or the wrong error handler might be called. Signed-off-by: Torge Matthies <openglfreak(a)googlemail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/x11drv_main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 9ec4c7a98f6..2fac560556b 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -108,6 +108,15 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; static CRITICAL_SECTION x11drv_section = { &critsect_debug, -1, 0, 0, 0, 0 }; +static CRITICAL_SECTION x11drv_error_section; +static CRITICAL_SECTION_DEBUG x11drv_error_section_debug = +{ + 0, 0, &x11drv_error_section, + { &x11drv_error_section_debug.ProcessLocksList, &x11drv_error_section_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": x11drv_error_section") } +}; +static CRITICAL_SECTION x11drv_error_section = { &x11drv_error_section_debug, -1, 0, 0, 0, 0 }; + struct d3dkmt_vidpn_source { D3DKMT_VIDPNSOURCEOWNER_TYPE type; /* VidPN source owner type */ @@ -256,6 +265,7 @@ static inline BOOL ignore_error( Display *display, XErrorEvent *event ) */ void X11DRV_expect_error( Display *display, x11drv_error_callback callback, void *arg ) { + EnterCriticalSection( &x11drv_error_section ); err_callback = callback; err_callback_display = display; err_callback_arg = arg; @@ -272,8 +282,10 @@ void X11DRV_expect_error( Display *display, x11drv_error_callback callback, void */ int X11DRV_check_error(void) { + int res = err_callback_result; err_callback = NULL; - return err_callback_result; + LeaveCriticalSection( &x11drv_error_section ); + return res; }
1
0
0
0
Francois Gouget : make_unicode: Add support for the 720 codepage (Arabic, Farsi and Urdu).
by Alexandre Julliard
08 Jun '21
08 Jun '21
Module: wine Branch: master Commit: a1bae9f288a53d21a60dca5460b376a493585e07 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a1bae9f288a53d21a60dca54…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 8 12:30:57 2021 +0200 make_unicode: Add support for the 720 codepage (Arabic, Farsi and Urdu). Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/kernelbase.rgs | 1 + dlls/kernelbase/locale.c | 1 + loader/wine.inf.in | 1 + nls/Makefile.in | 1 + nls/c_720.nls | Bin 0 -> 66594 bytes tools/make_unicode | 1 + 6 files changed, 5 insertions(+) diff --git a/dlls/kernelbase/kernelbase.rgs b/dlls/kernelbase/kernelbase.rgs index 0d9dbd29c43..7b63b681f53 100644 --- a/dlls/kernelbase/kernelbase.rgs +++ b/dlls/kernelbase/kernelbase.rgs @@ -57,6 +57,7 @@ HKLM val '437' = s 'c_437.nls' val '500' = s 'c_500.nls' val '708' = s 'c_708.nls' + val '720' = s 'c_720.nls' val '737' = s 'c_737.nls' val '775' = s 'c_775.nls' val '850' = s 'c_850.nls' diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c index 7623e387cdf..89b35775053 100644 --- a/dlls/kernelbase/locale.c +++ b/dlls/kernelbase/locale.c @@ -106,6 +106,7 @@ static const struct { UINT cp; const WCHAR *name; } codepage_names[] = { 437, L"OEM United States" }, { 500, L"IBM EBCDIC International" }, { 708, L"Arabic ASMO" }, + { 720, L"Arabic (Transparent ASMO)" }, { 737, L"OEM Greek 437G" }, { 775, L"OEM Baltic" }, { 850, L"OEM Multilingual Latin 1" }, diff --git a/loader/wine.inf.in b/loader/wine.inf.in index c909f58f53c..24da6f3af6b 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -4085,6 +4085,7 @@ c_28605.nls c_437.nls c_500.nls c_708.nls +c_720.nls c_737.nls c_775.nls c_850.nls diff --git a/nls/Makefile.in b/nls/Makefile.in index 4352becac5f..456822aaa83 100644 --- a/nls/Makefile.in +++ b/nls/Makefile.in @@ -46,6 +46,7 @@ SOURCES = \ c_437.nls \ c_500.nls \ c_708.nls \ + c_720.nls \ c_737.nls \ c_775.nls \ c_850.nls \ diff --git a/nls/c_720.nls b/nls/c_720.nls new file mode 100644 index 00000000000..8d3d950e70a Binary files /dev/null and b/nls/c_720.nls differ diff --git a/tools/make_unicode b/tools/make_unicode index 1e0dbe419e1..8ece72926c2 100755 --- a/tools/make_unicode +++ b/tools/make_unicode @@ -46,6 +46,7 @@ my @allfiles = "CodpageFiles/437.txt", "CodpageFiles/500.txt", "CodpageFiles/708.txt", + "CodpageFiles/720.txt", "CodpageFiles/737.txt", "CodpageFiles/775.txt", "CodpageFiles/850.txt",
1
0
0
0
Dmitry Timoshkov : mshtml: Fix typos in traces.
by Alexandre Julliard
08 Jun '21
08 Jun '21
Module: wine Branch: master Commit: 08f7c15f3586263c64ac655f5fba4009da533d2e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=08f7c15f3586263c64ac655f…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jun 8 19:15:42 2021 +0300 mshtml: Fix typos in traces. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/dispex.c | 2 +- dlls/mshtml/htmlscript.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index cb2721ec141..39630590228 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -331,7 +331,7 @@ static void add_func_info(dispex_data_t *data, tid_t tid, const FUNCDESC *desc, hres = ITypeInfo_GetRefTypeInfo(dti, tdesc->u.lptdesc->u.hreftype, &ref_type_info); if(FAILED(hres)) { - ERR("Coulg not get referenced type info: %08x\n", hres); + ERR("Could not get referenced type info: %08x\n", hres); return; } diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c index 60fd94e3d44..4d7997e31a6 100644 --- a/dlls/mshtml/htmlscript.c +++ b/dlls/mshtml/htmlscript.c @@ -192,7 +192,7 @@ static HRESULT WINAPI HTMLScriptElement_put_text(IHTMLScriptElement *iface, BSTR TRACE("(%p)->(%s)\n", This, debugstr_w(v)); if(!This->element.node.doc || !This->element.node.doc->window) { - WARN("no windoow\n"); + WARN("no window\n"); return E_UNEXPECTED; }
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
82
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Results per page:
10
25
50
100
200