Fix for MSVC 2015: round has been added to this version

This commit is contained in:
Photonios 2015-09-22 18:26:14 +02:00
parent ac25ba0a3f
commit 71925fcc00

View File

@ -142,16 +142,20 @@ static int pthread_mutex_init(pthread_mutex_t *mutex, void* fake)
#endif
#endif
/* what's this, we have no round function either? */
#if (defined(__FreeBSD__) && __FreeBSD_version < 503000) \
|| (defined(_WIN32) && !defined(__GNUC__)) \
|| (defined(sun) || defined(__sun__)) \
&& (defined(__SunOS_5_8) || defined(__SunOS_5_9))
/* what's this, we have no round function either? */
/* round has been added in the standard library with MSVC 2015 */
#if _MSC_VER < 1900
static double round(double num)
{
return (num >= 0) ? floor(num + 0.5) : ceil(num - 0.5);
}
#endif
#endif
/* resolve missing isinf() function for Solaris */
#if defined (__SVR4) && defined (__sun)