diff options
author | Oliver Stöneberg <oliverst@online.de> | 2015-01-31 23:42:53 +0100 |
---|---|---|
committer | Oliver Stöneberg <oliverst@online.de> | 2015-01-31 23:42:53 +0100 |
commit | 78bacb07c2f07359c2fb6d81d3e889a1efdd0e14 (patch) | |
tree | f2b938900bffeb2bd232594fcc5cd3aed4766059 | |
parent | 22b90a3374a5bd6ad17341e463bbc4463fc0e326 (diff) |
restored winprefix.h change by Peter Ferrie (nw)
also moved some code around and only defined strtoll when it is actually
necessary
-rw-r--r-- | src/osd/windows/winprefix.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/osd/windows/winprefix.h b/src/osd/windows/winprefix.h index 2635685eff1..979a11d9386 100644 --- a/src/osd/windows/winprefix.h +++ b/src/osd/windows/winprefix.h @@ -20,6 +20,14 @@ #if _MSC_VER < 1500 #define vsnprintf _vsnprintf #endif +#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; } +#define strtoll _strtoi64 +#endif #if _MSC_VER < 1900 #define snprintf _snprintf #else @@ -40,14 +48,5 @@ #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 "\\" |