ucrtbase: Add ilogb* functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a91c1e054a
commit
8c8d8e80f5
|
@ -18698,6 +18698,8 @@ for ac_func in \
|
|||
exp2f \
|
||||
expm1 \
|
||||
expm1f \
|
||||
ilogb \
|
||||
ilogbf \
|
||||
j0 \
|
||||
j1 \
|
||||
jn \
|
||||
|
|
|
@ -2743,6 +2743,8 @@ AC_CHECK_FUNCS(\
|
|||
exp2f \
|
||||
expm1 \
|
||||
expm1f \
|
||||
ilogb \
|
||||
ilogbf \
|
||||
j0 \
|
||||
j1 \
|
||||
jn \
|
||||
|
|
|
@ -254,9 +254,9 @@
|
|||
@ cdecl -arch=arm,x86_64,arm64 fmodf(float float) ucrtbase.fmodf
|
||||
@ cdecl frexp(double ptr) ucrtbase.frexp
|
||||
@ cdecl hypot(double double) ucrtbase.hypot
|
||||
@ stub ilogb
|
||||
@ stub ilogbf
|
||||
@ stub ilogbl
|
||||
@ cdecl ilogb(double) ucrtbase.ilogb
|
||||
@ cdecl ilogbf(float) ucrtbase.ilogbf
|
||||
@ cdecl ilogbl(double) ucrtbase.ilogbl
|
||||
@ cdecl ldexp(double long) ucrtbase.ldexp
|
||||
@ cdecl lgamma(double) ucrtbase.lgamma
|
||||
@ cdecl lgammaf(float) ucrtbase.lgammaf
|
||||
|
|
|
@ -2207,9 +2207,9 @@
|
|||
@ cdecl gets_s(ptr long) MSVCRT_gets_s
|
||||
@ cdecl getwc(ptr) MSVCRT_getwc
|
||||
@ cdecl getwchar() MSVCRT_getwchar
|
||||
@ stub ilogb
|
||||
@ stub ilogbf
|
||||
@ stub ilogbl
|
||||
@ cdecl ilogb(double) MSVCR120_ilogb
|
||||
@ cdecl ilogbf(float) MSVCR120_ilogbf
|
||||
@ cdecl ilogbl(double) MSVCR120_ilogbl
|
||||
@ stub imaxabs
|
||||
@ stub imaxdiv
|
||||
@ cdecl is_wctype(long long) ntdll.iswctype
|
||||
|
|
|
@ -1871,9 +1871,9 @@
|
|||
@ cdecl gets_s(ptr long) msvcr120.gets_s
|
||||
@ cdecl getwc(ptr) msvcr120.getwc
|
||||
@ cdecl getwchar() msvcr120.getwchar
|
||||
@ stub ilogb
|
||||
@ stub ilogbf
|
||||
@ stub ilogbl
|
||||
@ cdecl ilogb(double) msvcr120.ilogb
|
||||
@ cdecl ilogbf(float) msvcr120.ilogbf
|
||||
@ cdecl ilogbl(double) msvcr120.ilogbl
|
||||
@ stub imaxabs
|
||||
@ stub imaxdiv
|
||||
@ cdecl isalnum(long) msvcr120.isalnum
|
||||
|
|
|
@ -3433,4 +3433,35 @@ double CDECL MSVCR120_creal(_Dcomplex z)
|
|||
return z.x;
|
||||
}
|
||||
|
||||
int CDECL MSVCR120_ilogb(double x)
|
||||
{
|
||||
if (!x) return MSVCRT_FP_ILOGB0;
|
||||
if (isnan(x)) return MSVCRT_FP_ILOGBNAN;
|
||||
if (isinf(x)) return MSVCRT_INT_MAX;
|
||||
|
||||
#ifdef HAVE_ILOGB
|
||||
return ilogb(x);
|
||||
#else
|
||||
return logb(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
int CDECL MSVCR120_ilogbf(float x)
|
||||
{
|
||||
if (!x) return MSVCRT_FP_ILOGB0;
|
||||
if (isnan(x)) return MSVCRT_FP_ILOGBNAN;
|
||||
if (isinf(x)) return MSVCRT_INT_MAX;
|
||||
|
||||
#ifdef HAVE_ILOGBF
|
||||
return ilogbf(x);
|
||||
#else
|
||||
return logbf(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
int CDECL MSVCR120_ilogbl(LDOUBLE x)
|
||||
{
|
||||
return MSVCR120_ilogb(x);
|
||||
}
|
||||
|
||||
#endif /* _MSVCR_VER>=120 */
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
||||
#define MSVCRT_INT_MAX 0x7fffffff
|
||||
#define MSVCRT_LONG_MAX 0x7fffffff
|
||||
#define MSVCRT_LONG_MIN (-MSVCRT_LONG_MAX-1)
|
||||
#define MSVCRT_ULONG_MAX 0xffffffff
|
||||
|
@ -1187,6 +1188,9 @@ printf_arg arg_clbk_positional(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN;
|
|||
#define MSVCRT__OVERFLOW 3
|
||||
#define MSVCRT__UNDERFLOW 4
|
||||
|
||||
#define MSVCRT_FP_ILOGB0 (-MSVCRT_INT_MAX - 1)
|
||||
#define MSVCRT_FP_ILOGBNAN MSVCRT_INT_MAX
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float f;
|
||||
|
|
|
@ -2341,9 +2341,9 @@
|
|||
@ cdecl getwc(ptr) MSVCRT_getwc
|
||||
@ cdecl getwchar() MSVCRT_getwchar
|
||||
@ cdecl hypot(double double) _hypot
|
||||
@ stub ilogb
|
||||
@ stub ilogbf
|
||||
@ stub ilogbl
|
||||
@ cdecl ilogb(double) MSVCR120_ilogb
|
||||
@ cdecl ilogbf(float) MSVCR120_ilogbf
|
||||
@ cdecl ilogbl(double) MSVCR120_ilogbl
|
||||
@ stub imaxabs
|
||||
@ stub imaxdiv
|
||||
@ cdecl is_wctype(long long) ntdll.iswctype
|
||||
|
|
|
@ -303,6 +303,12 @@
|
|||
/* Define to 1 if you have the `if_nameindex' function. */
|
||||
#undef HAVE_IF_NAMEINDEX
|
||||
|
||||
/* Define to 1 if you have the `ilogb' function. */
|
||||
#undef HAVE_ILOGB
|
||||
|
||||
/* Define to 1 if you have the `ilogbf' function. */
|
||||
#undef HAVE_ILOGBF
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#undef HAVE_INET_ADDR
|
||||
|
||||
|
|
Loading…
Reference in New Issue