Commit acd2f1e5 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

msvcrt: Compile but show an error if Bessel functions aren't available.

parent c3f92419
...@@ -17649,6 +17649,9 @@ for ac_func in \ ...@@ -17649,6 +17649,9 @@ for ac_func in \
exp2f \ exp2f \
expm1 \ expm1 \
expm1f \ expm1f \
j0 \
j1 \
jn \
lgamma \ lgamma \
lgammaf \ lgammaf \
llrint \ llrint \
...@@ -17673,7 +17676,10 @@ for ac_func in \ ...@@ -17673,7 +17676,10 @@ for ac_func in \
round \ round \
roundf \ roundf \
trunc \ trunc \
truncf truncf \
y0 \
y1 \
yn
do : do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
......
...@@ -2698,6 +2698,9 @@ AC_CHECK_FUNCS(\ ...@@ -2698,6 +2698,9 @@ AC_CHECK_FUNCS(\
exp2f \ exp2f \
expm1 \ expm1 \
expm1f \ expm1f \
j0 \
j1 \
jn \
lgamma \ lgamma \
lgammaf \ lgammaf \
llrint \ llrint \
...@@ -2722,7 +2725,10 @@ AC_CHECK_FUNCS(\ ...@@ -2722,7 +2725,10 @@ AC_CHECK_FUNCS(\
round \ round \
roundf \ roundf \
trunc \ trunc \
truncf truncf \
y0 \
y1 \
yn
) )
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
......
...@@ -1412,7 +1412,12 @@ INT CDECL MSVCRT__isnan(double num) ...@@ -1412,7 +1412,12 @@ INT CDECL MSVCRT__isnan(double num)
double CDECL MSVCRT__j0(double num) double CDECL MSVCRT__j0(double num)
{ {
/* FIXME: errno handling */ /* FIXME: errno handling */
#ifdef HAVE_J0
return j0(num); return j0(num);
#else
FIXME("not implemented\n");
return 0;
#endif
} }
/********************************************************************* /*********************************************************************
...@@ -1421,7 +1426,12 @@ double CDECL MSVCRT__j0(double num) ...@@ -1421,7 +1426,12 @@ double CDECL MSVCRT__j0(double num)
double CDECL MSVCRT__j1(double num) double CDECL MSVCRT__j1(double num)
{ {
/* FIXME: errno handling */ /* FIXME: errno handling */
#ifdef HAVE_J1
return j1(num); return j1(num);
#else
FIXME("not implemented\n");
return 0;
#endif
} }
/********************************************************************* /*********************************************************************
...@@ -1430,7 +1440,12 @@ double CDECL MSVCRT__j1(double num) ...@@ -1430,7 +1440,12 @@ double CDECL MSVCRT__j1(double num)
double CDECL MSVCRT__jn(int n, double num) double CDECL MSVCRT__jn(int n, double num)
{ {
/* FIXME: errno handling */ /* FIXME: errno handling */
#ifdef HAVE_JN
return jn(n, num); return jn(n, num);
#else
FIXME("not implemented\n");
return 0;
#endif
} }
/********************************************************************* /*********************************************************************
...@@ -1440,12 +1455,17 @@ double CDECL MSVCRT__y0(double num) ...@@ -1440,12 +1455,17 @@ double CDECL MSVCRT__y0(double num)
{ {
double retval; double retval;
if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM; if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
#ifdef HAVE_Y0
retval = y0(num); retval = y0(num);
if (MSVCRT__fpclass(retval) == MSVCRT__FPCLASS_NINF) if (MSVCRT__fpclass(retval) == MSVCRT__FPCLASS_NINF)
{ {
*MSVCRT__errno() = MSVCRT_EDOM; *MSVCRT__errno() = MSVCRT_EDOM;
retval = sqrt(-1); retval = NAN;
} }
#else
FIXME("not implemented\n");
retval = 0;
#endif
return retval; return retval;
} }
...@@ -1456,12 +1476,17 @@ double CDECL MSVCRT__y1(double num) ...@@ -1456,12 +1476,17 @@ double CDECL MSVCRT__y1(double num)
{ {
double retval; double retval;
if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM; if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
#ifdef HAVE_Y1
retval = y1(num); retval = y1(num);
if (MSVCRT__fpclass(retval) == MSVCRT__FPCLASS_NINF) if (MSVCRT__fpclass(retval) == MSVCRT__FPCLASS_NINF)
{ {
*MSVCRT__errno() = MSVCRT_EDOM; *MSVCRT__errno() = MSVCRT_EDOM;
retval = sqrt(-1); retval = NAN;
} }
#else
FIXME("not implemented\n");
retval = 0;
#endif
return retval; return retval;
} }
...@@ -1472,12 +1497,17 @@ double CDECL MSVCRT__yn(int order, double num) ...@@ -1472,12 +1497,17 @@ double CDECL MSVCRT__yn(int order, double num)
{ {
double retval; double retval;
if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM; if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
#ifdef HAVE_YN
retval = yn(order,num); retval = yn(order,num);
if (MSVCRT__fpclass(retval) == MSVCRT__FPCLASS_NINF) if (MSVCRT__fpclass(retval) == MSVCRT__FPCLASS_NINF)
{ {
*MSVCRT__errno() = MSVCRT_EDOM; *MSVCRT__errno() = MSVCRT_EDOM;
retval = sqrt(-1); retval = NAN;
} }
#else
FIXME("not implemented\n");
retval = 0;
#endif
return retval; return retval;
} }
......
...@@ -342,6 +342,15 @@ ...@@ -342,6 +342,15 @@
/* Define to 1 if you have the `isnanf' function. */ /* Define to 1 if you have the `isnanf' function. */
#undef HAVE_ISNANF #undef HAVE_ISNANF
/* Define to 1 if you have the `j0' function. */
#undef HAVE_J0
/* Define to 1 if you have the `j1' function. */
#undef HAVE_J1
/* Define to 1 if you have the `jn' function. */
#undef HAVE_JN
/* Define to 1 if you have the <jpeglib.h> header file. */ /* Define to 1 if you have the <jpeglib.h> header file. */
#undef HAVE_JPEGLIB_H #undef HAVE_JPEGLIB_H
...@@ -1365,6 +1374,15 @@ ...@@ -1365,6 +1374,15 @@
/* Define if Xrandr has the XRRGetScreenResources function */ /* Define if Xrandr has the XRRGetScreenResources function */
#undef HAVE_XRRGETSCREENRESOURCES #undef HAVE_XRRGETSCREENRESOURCES
/* Define to 1 if you have the `y0' function. */
#undef HAVE_Y0
/* Define to 1 if you have the `y1' function. */
#undef HAVE_Y1
/* Define to 1 if you have the `yn' function. */
#undef HAVE_YN
/* Define to 1 if you have the `z' library (-lz). */ /* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_ZLIB #undef HAVE_ZLIB
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment