winprefix: support some C99 extensions in older MSVC [Peter Ferrie]

This commit is contained in:
peterferrie 2015-01-03 18:22:18 -08:00
parent aa78d4dd5d
commit 17f660d6eb

View File

@ -38,5 +38,14 @@
#define min(x,y) fmin(x,y)
#define max(x,y) fmax(x,y)
#endif
#ifdef _MSC_VER
#if _MSC_VER < 1800
#define _USE_MATH_DEFINES
#include <math.h>
static __inline double fmin(double x, double y){ return (x < y) ? x : y; }
static __inline double fmax(double x, double y){ return (x > y) ? x : y; }
static __inline double log2(double x) { return log(x) * M_LOG2E; }
#endif
#endif
#define PATH_SEPARATOR "\\"