Fix issue 105 - lost fixes for some version of Visual Studio (#107)

This commit is contained in:
Grzegorz Wawiorko
2019-04-02 16:31:30 +02:00
committed by Kévin Petit
parent 7c763df0a1
commit 52f6ad4a63
2 changed files with 9 additions and 5 deletions

View File

@@ -188,6 +188,10 @@ long double remquol( long double x, long double y, int *quo);
long double scalblnl(long double x, long n); long double scalblnl(long double x, long n);
// snprintf added in _MSC_VER == 1900 (Visual Studio 2015)
#if defined( _MSC_VER ) && _MSC_VER < 1900
#define snprintf sprintf_s
#endif
float hypotf(float x, float y); float hypotf(float x, float y);
long double hypotl(long double x, long double y) ; long double hypotl(long double x, long double y) ;
double lgamma(double x); double lgamma(double x);
@@ -215,7 +219,10 @@ long double roundl(long double x);
int cf_signbit(double x); int cf_signbit(double x);
int cf_signbitf(float x); int cf_signbitf(float x);
// Added in _MSC_VER == 1800 (Visual Studio 2013)
#if defined( _MSC_VER ) && _MSC_VER < 1800
static int signbit(double x) { return cf_signbit(x); } static int signbit(double x) { return cf_signbit(x); }
#endif
static int signbitf(float x) { return cf_signbitf(x); } static int signbitf(float x) { return cf_signbitf(x); }
long int lrint (double flt); long int lrint (double flt);
@@ -249,10 +256,6 @@ int32_t float2int (float fx);
// stdio.h // stdio.h
// //
#if defined( _MSC_VER )
#define snprintf sprintf_s
#endif
// //

View File

@@ -565,7 +565,7 @@ long int lrintf (float x)
// fenv functions // fenv functions
// //
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
#if _MSC_VER < 1900
int fetestexcept(int excepts) int fetestexcept(int excepts)
{ {
unsigned int status = _statusfp(); unsigned int status = _statusfp();
@@ -583,6 +583,7 @@ int feclearexcept(int excepts)
_clearfp(); _clearfp();
return 0; return 0;
} }
#endif
#endif // __INTEL_COMPILER #endif // __INTEL_COMPILER