From: Jacek Caban <jacek@codeweavers.com> --- dlls/msvcr120/tests/msvcr120.c | 4 --- include/msvcrt/math.h | 66 +++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index 856e9251e61..67a534247e2 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -38,10 +38,6 @@ #include <locale.h> -_ACRTIMP float __cdecl nexttowardf(float, double); -_ACRTIMP double __cdecl nexttoward(double, double); -_ACRTIMP double __cdecl nexttowardl(double, double); - #define _MAX__TIME64_T (((__time64_t)0x00000007 << 32) | 0x93406FFF) #ifdef __i386__ diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h index 39d285eeb64..2fed46a7f3c 100644 --- a/include/msvcrt/math.h +++ b/include/msvcrt/math.h @@ -431,6 +431,70 @@ static inline double y1( double x ) { return _y1( x ); } static inline double yn( int n, double x ) { return _yn( n, x ); } static inline float hypotf( float x, float y ) { return _hypotf( x, y ); } -static inline long double atan2l( long double x, long double y ) { return atan2( (double)y, (double)x ); } +#if !defined(__SIZEOF_LONG_DOUBLE__) || __SIZEOF_LONG_DOUBLE__ == 8 + +_ACRTIMP float __cdecl nexttowardf(float, long double); +_ACRTIMP double __cdecl nexttoward(double, long double); +_ACRTIMP long double __cdecl nexttowardl(long double, long double); + +_ACRTIMP long double __cdecl acoshl(long double); +_ACRTIMP long double __cdecl asinhl(long double); +_ACRTIMP long double __cdecl atanhl(long double); +_ACRTIMP long double __cdecl cbrtl(long double); +_ACRTIMP long double __cdecl copysignl(long double, long double); +_ACRTIMP long double __cdecl coshl(long double); +_ACRTIMP long double __cdecl erfcl(long double); +_ACRTIMP long double __cdecl erfl(long double); +_ACRTIMP long double __cdecl exp2l(long double); +_ACRTIMP long double __cdecl expm1l(long double); +_ACRTIMP long double __cdecl fdiml(long double, long double); +_ACRTIMP long double __cdecl fmal(long double, long double, long double); +_ACRTIMP long double __cdecl fmaxl(long double, long double); +_ACRTIMP long double __cdecl fminl(long double, long double); +_ACRTIMP int __cdecl ilogbl(long double); +_ACRTIMP long double __cdecl lgammal(long double); +_ACRTIMP __int64 __cdecl llrintl(long double); +_ACRTIMP __int64 __cdecl llroundl(long double); +_ACRTIMP __msvcrt_long __cdecl lrintl(long double); +_ACRTIMP __msvcrt_long __cdecl lroundl(long double); +_ACRTIMP long double __cdecl log1pl(long double); +_ACRTIMP long double __cdecl log2l(long double); +_ACRTIMP long double __cdecl logbl(long double); +_ACRTIMP long double __cdecl nanl(const char *); +_ACRTIMP long double __cdecl nearbyintl(long double); +_ACRTIMP long double __cdecl nextafterl(long double, long double); +_ACRTIMP long double __cdecl remainderl(long double, long double); +_ACRTIMP long double __cdecl remquol(long double, long double, int *); +_ACRTIMP long double __cdecl rintl(long double); +_ACRTIMP long double __cdecl roundl(long double); +_ACRTIMP long double __cdecl scalblnl(long double, __msvcrt_long); +_ACRTIMP long double __cdecl scalbnl(long double, int); +_ACRTIMP long double __cdecl tgammal(long double); +_ACRTIMP long double __cdecl truncl(long double); + +static inline long double acosl(long double x) { return acos(x); } +static inline long double asinl(long double x) { return asin(x); } +static inline long double atan2l(long double y, long double x) { return atan2(y, x); } +static inline long double atanl(long double x) { return atan(x); } +static inline long double ceill(long double x) { return ceil(x); } +static inline long double cosl(long double x) { return cos(x); } +static inline long double expl(long double x) { return exp(x); } +static inline long double fabsl(long double x) { return fabs((double)x); } +static inline long double floorl(long double x) { return floor(x); } +static inline long double fmodl(long double x, long double y) { return fmod(x, y); } +static inline long double frexpl(long double x, int *y) { return frexp(x, y); } +static inline long double hypotl(long double x, long double y) { return _hypot(x, y); } +static inline long double ldexpl(long double x, int y) { return ldexp(x, y); } +static inline long double log10l(long double x) { return log10(x); } +static inline long double logl(long double x) { return log(x); } +static inline long double modfl(long double x, long double *y) { return modf(x, (double *)y); } +static inline long double powl(long double x, long double y) { return pow(x, y); } +static inline long double sinhl(long double x) { return sinh(x); } +static inline long double sinl(long double x) { return sin(x); } +static inline long double sqrtl(long double x) { return sqrt(x); } +static inline long double tanhl(long double x) { return tanh(x); } +static inline long double tanl(long double x) { return tan(x); } + +#endif #endif /* __WINE_MATH_H */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10123