Skip to content

Commit 4731681

Browse files
committed
Applying the same fix as _yn to c11 version
1 parent 0840a8d commit 4731681

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/c99_flonum.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
#include "roundeven.inc"
4040

41-
#if !(__STDC_VERSION__ >= 199901L) && !defined(__GNUC__)
41+
#if (__STDC_VERSION__ < 199901L) && !defined(__GNUC__)
4242
# if defined(_MSC_VER)
4343
# if _MSC_VER < 1800
4444
/* under VS 2012. add required ones */
@@ -384,6 +384,14 @@ static __inline double yn_wrap(int n, double x)
384384
# else
385385
# error "not supported"
386386
# endif
387+
#elif (__STDC_VERSION__ >= 199901L) && defined(_MSC_VER)
388+
/* The same thing is applied to MSVC using C11 :( */
389+
static __inline double yn_wrap(int n, double x)
390+
{
391+
if (x == 0.0) return -INFINITY;
392+
return yn(n, x);
393+
}
394+
# define yn yn_wrap
387395
#endif
388396

389397
/*

0 commit comments

Comments
 (0)