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 2021
----- 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
770 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Implement lrintf using rintf function.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: aa2248164c0492f0554c65b268de3a7b2a1ac616 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa2248164c0492f0554c65b2…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 10 20:11:54 2021 +0200 msvcrt: Implement lrintf using rintf function. 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 | 10 +++++++++- dlls/msvcrt/unixlib.c | 13 ------------- dlls/msvcrt/unixlib.h | 1 - include/config.h.in | 3 --- 6 files changed, 9 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 2b17a5b20c7..b4434b16a86 100755 --- a/configure +++ b/configure @@ -19642,7 +19642,6 @@ for ac_func in \ log1pf \ log2 \ log2f \ - lrintf \ nearbyint \ nearbyintf \ nexttoward \ diff --git a/configure.ac b/configure.ac index 7af593fa6fd..2cd25a5671b 100644 --- a/configure.ac +++ b/configure.ac @@ -2682,7 +2682,6 @@ AC_CHECK_FUNCS(\ log1pf \ log2 \ log2f \ - lrintf \ nearbyint \ nearbyintf \ nexttoward \ diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index fd580d44a9d..22b2b0c71ed 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -4356,7 +4356,15 @@ __msvcrt_long CDECL lrint(double x) */ __msvcrt_long CDECL lrintf(float x) { - return unix_funcs->lrintf( x ); + float f; + + f = rintf(x); + if ((f < 0 && f != (float)(__msvcrt_long)f) + || (f >= 0 && f != (float)(__msvcrt_ulong)f)) { + *_errno() = EDOM; + return 0; + } + return f; } /********************************************************************* diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c index 0353859eec2..52410b0cc9c 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c @@ -555,18 +555,6 @@ static float CDECL unix_logbf( float x ) return logbf( x ); } -/********************************************************************* - * lrintf - */ -static int CDECL unix_lrintf(float x) -{ -#ifdef HAVE_LRINTF - return lrintf(x); -#else - return x >= 0 ? floorf(x + 0.5) : ceilf(x - 0.5); -#endif -} - /********************************************************************* * modf */ @@ -882,7 +870,6 @@ static const struct unix_funcs funcs = unix_log2f, unix_logb, unix_logbf, - unix_lrintf, unix_modf, unix_modff, unix_nearbyint, diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h index 83356b0125b..4a33940fd64 100644 --- a/dlls/msvcrt/unixlib.h +++ b/dlls/msvcrt/unixlib.h @@ -72,7 +72,6 @@ struct unix_funcs float (CDECL *log2f)(float x); double (CDECL *logb)(double x); float (CDECL *logbf)(float x); - int (CDECL *lrintf)(float x); double (CDECL *modf)(double x, double *iptr); float (CDECL *modff)(float x, float *iptr); double (CDECL *nearbyint)(double num); diff --git a/include/config.h.in b/include/config.h.in index 5dac8fd704c..920600dd680 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -471,9 +471,6 @@ /* Define to 1 if you have the `log2f' function. */ #undef HAVE_LOG2F -/* Define to 1 if you have the `lrintf' function. */ -#undef HAVE_LRINTF - /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT
1
0
0
0
Piotr Caban : msvcrt: Implement lrint using rint function.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: 0838c995ea540975ff37cc7dead0f28084c24eb6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0838c995ea540975ff37cc7d…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 10 20:11:48 2021 +0200 msvcrt: Implement lrint using rint function. 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 | 10 +++++++++- dlls/msvcrt/unixlib.c | 13 ------------- dlls/msvcrt/unixlib.h | 1 - include/config.h.in | 3 --- 6 files changed, 9 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 25161a1f27a..2b17a5b20c7 100755 --- a/configure +++ b/configure @@ -19642,7 +19642,6 @@ for ac_func in \ log1pf \ log2 \ log2f \ - lrint \ lrintf \ nearbyint \ nearbyintf \ diff --git a/configure.ac b/configure.ac index 46d6f17fe73..7af593fa6fd 100644 --- a/configure.ac +++ b/configure.ac @@ -2682,7 +2682,6 @@ AC_CHECK_FUNCS(\ log1pf \ log2 \ log2f \ - lrint \ lrintf \ nearbyint \ nearbyintf \ diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 1e67aa03964..fd580d44a9d 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -4340,7 +4340,15 @@ float CDECL rintf(float x) */ __msvcrt_long CDECL lrint(double x) { - return unix_funcs->lrint( x ); + double d; + + d = rint(x); + if ((d < 0 && d != (double)(__msvcrt_long)d) + || (d >= 0 && d != (double)(__msvcrt_ulong)d)) { + *_errno() = EDOM; + return 0; + } + return d; } /********************************************************************* diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c index e36c2e047b9..0353859eec2 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c @@ -555,18 +555,6 @@ static float CDECL unix_logbf( float x ) return logbf( x ); } -/********************************************************************* - * lrint - */ -static int CDECL unix_lrint(double x) -{ -#ifdef HAVE_LRINT - return lrint(x); -#else - return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); -#endif -} - /********************************************************************* * lrintf */ @@ -894,7 +882,6 @@ static const struct unix_funcs funcs = unix_log2f, unix_logb, unix_logbf, - unix_lrint, unix_lrintf, unix_modf, unix_modff, diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h index 74545507b26..83356b0125b 100644 --- a/dlls/msvcrt/unixlib.h +++ b/dlls/msvcrt/unixlib.h @@ -72,7 +72,6 @@ struct unix_funcs float (CDECL *log2f)(float x); double (CDECL *logb)(double x); float (CDECL *logbf)(float x); - int (CDECL *lrint)(double x); int (CDECL *lrintf)(float x); double (CDECL *modf)(double x, double *iptr); float (CDECL *modff)(float x, float *iptr); diff --git a/include/config.h.in b/include/config.h.in index ee34d528122..5dac8fd704c 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -471,9 +471,6 @@ /* Define to 1 if you have the `log2f' function. */ #undef HAVE_LOG2F -/* Define to 1 if you have the `lrint' function. */ -#undef HAVE_LRINT - /* Define to 1 if you have the `lrintf' function. */ #undef HAVE_LRINTF
1
0
0
0
Piotr Caban : msvcrt: Import rintf implementation from musl.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: ad2ecc6e06c4204a5b9eb68fa464e01dd30aa4d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ad2ecc6e06c4204a5b9eb68f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 10 20:11:40 2021 +0200 msvcrt: Import rintf 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 | 19 ++++++++++++++++++- dlls/msvcrt/unixlib.c | 13 ------------- dlls/msvcrt/unixlib.h | 1 - include/config.h.in | 3 --- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 59248c28c99..25161a1f27a 100755 --- a/configure +++ b/configure @@ -19652,7 +19652,6 @@ for ac_func in \ remainderf \ remquo \ remquof \ - rintf \ tgamma \ tgammaf \ trunc \ diff --git a/configure.ac b/configure.ac index 0c1ea608d7e..46d6f17fe73 100644 --- a/configure.ac +++ b/configure.ac @@ -2692,7 +2692,6 @@ AC_CHECK_FUNCS(\ remainderf \ remquo \ remquof \ - rintf \ tgamma \ tgammaf \ trunc \ diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index c1702c5b810..1e67aa03964 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -4312,10 +4312,27 @@ double CDECL rint(double x) /********************************************************************* * rintf (MSVCR120.@) + * + * Copied from musl: src/math/rintf.c */ float CDECL rintf(float x) { - return unix_funcs->rintf(x); + static const float toint = 1 / FLT_EPSILON; + + unsigned int ix = *(unsigned int*)&x; + int e = ix >> 23 & 0xff; + int s = ix >> 31; + float y; + + if (e >= 0x7f + 23) + return x; + if (s) + y = fp_barrierf(x - toint) + toint; + else + y = fp_barrierf(x + toint) - toint; + if (y == 0) + return s ? -0.0f : 0.0f; + return y; } /********************************************************************* diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c index f72fd0cc161..e36c2e047b9 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c @@ -729,18 +729,6 @@ static float CDECL unix_remquof(float x, float y, int *quo) #endif } -/********************************************************************* - * rintf - */ -static float CDECL unix_rintf(float x) -{ -#ifdef HAVE_RINTF - return rintf(x); -#else - return x >= 0 ? floorf(x + 0.5) : ceilf(x - 0.5); -#endif -} - /********************************************************************* * sin */ @@ -922,7 +910,6 @@ static const struct unix_funcs funcs = unix_remainderf, unix_remquo, unix_remquof, - unix_rintf, unix_sin, unix_sinf, unix_sinh, diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h index f5245cfb645..74545507b26 100644 --- a/dlls/msvcrt/unixlib.h +++ b/dlls/msvcrt/unixlib.h @@ -88,7 +88,6 @@ struct unix_funcs float (CDECL *remainderf)(float x, float y); double (CDECL *remquo)(double x, double y, int *quo); float (CDECL *remquof)(float x, float y, int *quo); - float (CDECL *rintf)(float x); double (CDECL *sin)(double x); float (CDECL *sinf)(float x); double (CDECL *sinh)(double x); diff --git a/include/config.h.in b/include/config.h.in index 181cbc3d5aa..ee34d528122 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -684,9 +684,6 @@ /* Define to 1 if you have the `res_getservers' function. */ #undef HAVE_RES_GETSERVERS -/* Define to 1 if you have the `rintf' function. */ -#undef HAVE_RINTF - /* Define to 1 if you have the <sasl/sasl.h> header file. */ #undef HAVE_SASL_SASL_H
1
0
0
0
Piotr Caban : msvcrt: Import rint implementation from musl.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: cba9981c473211ee53777dae70d82d3f80f92308 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cba9981c473211ee53777dae…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 10 20:11:34 2021 +0200 msvcrt: Import rint 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 | 33 ++++++++++++++++++++++++++++++++- dlls/msvcrt/unixlib.c | 13 ------------- dlls/msvcrt/unixlib.h | 1 - include/config.h.in | 3 --- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 2a4a756c812..59248c28c99 100755 --- a/configure +++ b/configure @@ -19652,7 +19652,6 @@ for ac_func in \ remainderf \ remquo \ remquof \ - rint \ rintf \ tgamma \ tgammaf \ diff --git a/configure.ac b/configure.ac index 5578ee98edf..0c1ea608d7e 100644 --- a/configure.ac +++ b/configure.ac @@ -2692,7 +2692,6 @@ AC_CHECK_FUNCS(\ remainderf \ remquo \ remquof \ - rint \ rintf \ tgamma \ tgammaf \ diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 95c83fcbcc9..c1702c5b810 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -87,6 +87,14 @@ static inline float fp_barrierf(float x) return y; } +#if _MSVCR_VER>=120 +static inline double fp_barrier(double x) +{ + volatile double y = x; + return y; +} +#endif + static inline double CDECL ret_nan( BOOL update_sw ) { double x = 1.0; @@ -4273,10 +4281,33 @@ float CDECL log2f(float x) /********************************************************************* * rint (MSVCR120.@) + * + * Copied from musl: src/math/rint.c */ double CDECL rint(double x) { - return unix_funcs->rint(x); + static const double toint = 1 / DBL_EPSILON; + + ULONGLONG llx = *(ULONGLONG*)&x; + int e = llx >> 52 & 0x7ff; + int s = llx >> 63; + unsigned cw; + double y; + + if (e >= 0x3ff+52) + return x; + cw = _controlfp(0, 0); + if ((cw & _MCW_PC) != _PC_53) + _controlfp(_PC_53, _MCW_PC); + if (s) + y = fp_barrier(x - toint) + toint; + else + y = fp_barrier(x + toint) - toint; + if ((cw & _MCW_PC) != _PC_53) + _controlfp(cw, _MCW_PC); + if (y == 0) + return s ? -0.0 : 0; + return y; } /********************************************************************* diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c index 33c25ef8d40..f72fd0cc161 100644 --- a/dlls/msvcrt/unixlib.c +++ b/dlls/msvcrt/unixlib.c @@ -729,18 +729,6 @@ static float CDECL unix_remquof(float x, float y, int *quo) #endif } -/********************************************************************* - * rint - */ -static double CDECL unix_rint(double x) -{ -#ifdef HAVE_RINT - return rint(x); -#else - return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); -#endif -} - /********************************************************************* * rintf */ @@ -934,7 +922,6 @@ static const struct unix_funcs funcs = unix_remainderf, unix_remquo, unix_remquof, - unix_rint, unix_rintf, unix_sin, unix_sinf, diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h index c96eda3c3a0..f5245cfb645 100644 --- a/dlls/msvcrt/unixlib.h +++ b/dlls/msvcrt/unixlib.h @@ -88,7 +88,6 @@ struct unix_funcs float (CDECL *remainderf)(float x, float y); double (CDECL *remquo)(double x, double y, int *quo); float (CDECL *remquof)(float x, float y, int *quo); - double (CDECL *rint)(double x); float (CDECL *rintf)(float x); double (CDECL *sin)(double x); float (CDECL *sinf)(float x); diff --git a/include/config.h.in b/include/config.h.in index a0bc1b4b247..181cbc3d5aa 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -684,9 +684,6 @@ /* Define to 1 if you have the `res_getservers' function. */ #undef HAVE_RES_GETSERVERS -/* Define to 1 if you have the `rint' function. */ -#undef HAVE_RINT - /* Define to 1 if you have the `rintf' function. */ #undef HAVE_RINTF
1
0
0
0
Piotr Caban : msvcrt: Don't compile msvcr120 math functions in older versions.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: d5fb71553614bc5a442e3c328ab87fef7f902855 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d5fb71553614bc5a442e3c32…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 10 20:11:28 2021 +0200 msvcrt: Don't compile msvcr120 math functions in older versions. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 64 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 1da6a0162da..95c83fcbcc9 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -4143,6 +4143,38 @@ void __cdecl __libm_sse2_sqrt_precise(void) } #endif /* __i386__ */ +/********************************************************************* + * _fdclass (MSVCR120.@) + * + * Copied from musl: src/math/__fpclassifyf.c + */ +short CDECL _fdclass(float x) +{ + union { float f; UINT32 i; } u = { x }; + int e = u.i >> 23 & 0xff; + + if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO; + if (e == 0xff) return u.i << 9 ? FP_NAN : FP_INFINITE; + return FP_NORMAL; +} + +/********************************************************************* + * _dclass (MSVCR120.@) + * + * Copied from musl: src/math/__fpclassify.c + */ +short CDECL _dclass(double x) +{ + union { double f; UINT64 i; } u = { x }; + int e = u.i >> 52 & 0x7ff; + + if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO; + if (e == 0x7ff) return (u.i << 12) ? FP_NAN : FP_INFINITE; + return FP_NORMAL; +} + +#if _MSVCR_VER>=120 + /********************************************************************* * cbrt (MSVCR120.@) */ @@ -4287,38 +4319,6 @@ __int64 CDECL llrintf(float x) return unix_funcs->llrintf( x ); } -/********************************************************************* - * _fdclass (MSVCR120.@) - * - * Copied from musl: src/math/__fpclassifyf.c - */ -short CDECL _fdclass(float x) -{ - union { float f; UINT32 i; } u = { x }; - int e = u.i >> 23 & 0xff; - - if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO; - if (e == 0xff) return u.i << 9 ? FP_NAN : FP_INFINITE; - return FP_NORMAL; -} - -/********************************************************************* - * _dclass (MSVCR120.@) - * - * Copied from musl: src/math/__fpclassify.c - */ -short CDECL _dclass(double x) -{ - union { double f; UINT64 i; } u = { x }; - int e = u.i >> 52 & 0x7ff; - - if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO; - if (e == 0x7ff) return (u.i << 12) ? FP_NAN : FP_INFINITE; - return FP_NORMAL; -} - -#if _MSVCR_VER>=120 - /********************************************************************* * round (MSVCR120.@) *
1
0
0
0
Francois Gouget : infosoft/tests: Fix refilling the text buffer.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: b908ec2294d8e4ac3ccd7befbb9e530af04d24f9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b908ec2294d8e4ac3ccd7bef…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon May 10 15:55:26 2021 +0200 infosoft/tests: Fix refilling the text buffer. Up to Windows 10 1507 BreakText() would increment iCur but later Windows versions leave it unchanged. So assume all characters up to iEnd have been processed. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50844
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/infosoft/tests/infosoft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/infosoft/tests/infosoft.c b/dlls/infosoft/tests/infosoft.c index c76aba63466..996af73ca20 100644 --- a/dlls/infosoft/tests/infosoft.c +++ b/dlls/infosoft/tests/infosoft.c @@ -152,7 +152,7 @@ static HRESULT WINAPI fillbuf_many(TEXT_SOURCE *ts) if (ts->awcBuffer == NULL) ts->awcBuffer = teststring; else - ts->awcBuffer += ts->iCur; + ts->awcBuffer += ts->iEnd; if (!ts->awcBuffer[0]) return WBREAK_E_END_OF_TEXT;
1
0
0
0
Francois Gouget : infosoft/tests: Fix the pfnFillTextBuffer() return value.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: 8ac9f334b4b7591a42c6aabf90d5326fe3e0fd02 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8ac9f334b4b7591a42c6aabf…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon May 10 15:54:11 2021 +0200 infosoft/tests: Fix the pfnFillTextBuffer() return value. Windows Vista to Windows 10 1507 expect pfnFillTextBuffer() to return WBREAK_E_END_OF_TEXT to signal the end of the string. Returning unexpected values such as E_FAIL causes BreakText() to abort and report them to the caller. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50843
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/infosoft/tests/infosoft.c | 5 +++-- include/cierror.h | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/infosoft/tests/infosoft.c b/dlls/infosoft/tests/infosoft.c index d221cee5732..c76aba63466 100644 --- a/dlls/infosoft/tests/infosoft.c +++ b/dlls/infosoft/tests/infosoft.c @@ -24,6 +24,7 @@ #include <stdio.h> #include <ole2.h> #include "indexsrv.h" +#include "cierror.h" #include "wine/test.h" @@ -141,7 +142,7 @@ static wordsink_impl wordsink = { { &wsvt } }; static HRESULT WINAPI fillbuf_none(TEXT_SOURCE *ts) { - return E_FAIL; + return WBREAK_E_END_OF_TEXT; } static HRESULT WINAPI fillbuf_many(TEXT_SOURCE *ts) @@ -154,7 +155,7 @@ static HRESULT WINAPI fillbuf_many(TEXT_SOURCE *ts) ts->awcBuffer += ts->iCur; if (!ts->awcBuffer[0]) - return E_FAIL; + return WBREAK_E_END_OF_TEXT; for( i=0; ts->awcBuffer[i] && ts->awcBuffer[i] != ' '; i++) ; diff --git a/include/cierror.h b/include/cierror.h index 049985beb11..e646c18e4b0 100644 --- a/include/cierror.h +++ b/include/cierror.h @@ -19,6 +19,13 @@ #ifndef __WINE_CIERROR_H__ #define __WINE_CIERROR_H__ +#define WBREAK_E_END_OF_TEXT 0x80041780 +#define LANGUAGE_S_LARGE_WORD 0x00041781 +#define WBREAK_E_QUERY_ONLY 0x80041782 +#define WBREAK_E_BUFFER_TOO_SMALL 0x80041783 +#define LANGUAGE_E_DATABASE_NOT_FOUND 0x80041784 +#define WBREAK_E_INIT_FAILED 0x80041785 + #define CI_E_ALREADY_INITIALIZED 0x8004180a #define CI_E_NOT_INITIALIZED 0x8004180b #define CI_E_BUFFERTOOSMALL 0x8004180c
1
0
0
0
Francois Gouget : infosoft/tests: Improve the failure messages.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: b2985803c28387a383b7afe3769cb0367e0f09da URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b2985803c28387a383b7afe3…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon May 10 15:53:57 2021 +0200 infosoft/tests: Improve the failure messages. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/infosoft/tests/infosoft.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/dlls/infosoft/tests/infosoft.c b/dlls/infosoft/tests/infosoft.c index 9ea79008364..d221cee5732 100644 --- a/dlls/infosoft/tests/infosoft.c +++ b/dlls/infosoft/tests/infosoft.c @@ -71,17 +71,26 @@ static HRESULT WINAPI ws_PutWord(IWordSink *iface, ULONG cwc, const WCHAR *pwcIn ULONG cwcSrcLen, ULONG cwcSrcPos) { HRESULT rc = S_OK; + + winetest_push_context("word %d", wordnum); if (wordnum < ARRAY_SIZE(testres)) { - ok(testres[wordnum].len == cwcSrcLen, "wrong length\n"); - ok(!cwcSrcPos ||(testres[wordnum].ofs == cwcSrcPos), "wrong offset\n"); - ok(!memcmp(testres[wordnum].data, pwcInBuf, cwcSrcLen), "wrong data\n"); + ok(testres[wordnum].len == cwcSrcLen, "expected length %d, got %d\n", + testres[wordnum].len, cwcSrcLen); + ok(!cwcSrcPos || (testres[wordnum].ofs == cwcSrcPos), + "expected offset %d, got %d\n", testres[wordnum].ofs, cwcSrcPos); + ok(!memcmp(testres[wordnum].data, pwcInBuf, cwcSrcLen), + "expected data %s, got %s\n", + wine_dbgstr_wn(testres[wordnum].data, cwcSrcLen), + wine_dbgstr_wn(pwcInBuf, cwcSrcLen)); } else { ok(0, "found too many words: %d\n", wordnum + 1); rc = E_FAIL; } + winetest_pop_context(); + wordnum++; return rc; } @@ -166,7 +175,7 @@ START_TEST(infosoft) TEXT_SOURCE ts; r = CoInitialize(NULL); - ok( r == S_OK, "failed\n"); + ok( r == S_OK, "failed: %08x\n", r); r = CoCreateInstance( &CLSID_wb_neutral, NULL, CLSCTX_INPROC_SERVER, &_IID_IWordBreaker, (LPVOID)&wb); @@ -184,9 +193,9 @@ START_TEST(infosoft) ts.iEnd = lstrlenW(ts.awcBuffer); ts.iCur = 0; r = IWordBreaker_BreakText(wb, &ts, &wordsink.IWordSink_iface, NULL); - ok( r == S_OK, "failed\n"); + ok( r == S_OK, "failed: %08x\n", r); - ok(wordnum == 4, "words not processed\n"); + ok(wordnum == 4, "expected 4 words, got %d\n", wordnum); wordnum = 0; ts.pfnFillTextBuffer = fillbuf_many; @@ -195,12 +204,12 @@ START_TEST(infosoft) ts.iCur = 0; r = fillbuf_many(&ts); - ok( r == S_OK, "failed\n"); + ok( r == S_OK, "failed: %08x\n", r); r = IWordBreaker_BreakText(wb, &ts, &wordsink.IWordSink_iface, NULL); - ok( r == S_OK, "failed\n"); + ok( r == S_OK, "failed: %08x\n", r); - ok(wordnum == 4, "words not processed\n"); + ok(wordnum == 4, "expected 4 words, got %d\n", wordnum); IWordBreaker_Release( wb ); CoUninitialize();
1
0
0
0
Francois Gouget : infosoft/tests: Fix the infinite loop and crash on Windows 10 1607+.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: 86edbc8b14b5abc10db68c0735e52373d3393854 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=86edbc8b14b5abc10db68c07…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon May 10 15:53:19 2021 +0200 infosoft/tests: Fix the infinite loop and crash on Windows 10 1607+. The test only has expected data for the first four words. So abort if more are found. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/infosoft/tests/infosoft.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/dlls/infosoft/tests/infosoft.c b/dlls/infosoft/tests/infosoft.c index 12bf65a56d3..9ea79008364 100644 --- a/dlls/infosoft/tests/infosoft.c +++ b/dlls/infosoft/tests/infosoft.c @@ -70,11 +70,20 @@ static ULONG WINAPI ws_Release(IWordSink *iface) static HRESULT WINAPI ws_PutWord(IWordSink *iface, ULONG cwc, const WCHAR *pwcInBuf, ULONG cwcSrcLen, ULONG cwcSrcPos) { - ok(testres[wordnum].len == cwcSrcLen, "wrong length\n"); - ok(!cwcSrcPos ||(testres[wordnum].ofs == cwcSrcPos), "wrong offset\n"); - ok(!memcmp(testres[wordnum].data, pwcInBuf, cwcSrcLen), "wrong data\n"); + HRESULT rc = S_OK; + if (wordnum < ARRAY_SIZE(testres)) + { + ok(testres[wordnum].len == cwcSrcLen, "wrong length\n"); + ok(!cwcSrcPos ||(testres[wordnum].ofs == cwcSrcPos), "wrong offset\n"); + ok(!memcmp(testres[wordnum].data, pwcInBuf, cwcSrcLen), "wrong data\n"); + } + else + { + ok(0, "found too many words: %d\n", wordnum + 1); + rc = E_FAIL; + } wordnum++; - return S_OK; + return rc; } static HRESULT WINAPI ws_PutAltWord(IWordSink *iface, ULONG cwc, const WCHAR *pwcInBuf,
1
0
0
0
Liam Middlebrook : winevulkan: Update to VK spec version 1.2.178.
by Alexandre Julliard
10 May '21
10 May '21
Module: wine Branch: master Commit: 21e002aa7e7f85d92d1efeaeb7a9545eb16b96ad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=21e002aa7e7f85d92d1efeae…
Author: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Date: Mon May 10 03:29:08 2021 -0700 winevulkan: Update to VK spec version 1.2.178. Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Signed-off-by: Daniel Koch <dkoch(a)nvidia.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/loader_thunks.c | 30 + dlls/winevulkan/loader_thunks.h | 5 + dlls/winevulkan/make_vulkan | 2 +- dlls/winevulkan/vulkan_thunks.c | 104 ++++ dlls/winevulkan/vulkan_thunks.h | 46 ++ dlls/winevulkan/winevulkan.json | 2 +- include/wine/vulkan.h | 1153 +++++++++++++++++++++------------------ 7 files changed, 809 insertions(+), 533 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=21e002aa7e7f85d92d1e…
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
77
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
Results per page:
10
25
50
100
200