diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2019-10-04 07:07:35 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2019-10-04 07:07:35 (GMT) |
commit | f90d5c574cba21880fecf57f844dacb6097a242f (patch) | |
tree | eb979dd4972267014828a9ef0f5d163d0cca11ad /generic/nanosvg.h | |
parent | a2d59bd893c9a1807ed32eace9676557d46a6f69 (diff) | |
download | tk-f90d5c574cba21880fecf57f844dacb6097a242f.zip tk-f90d5c574cba21880fecf57f844dacb6097a242f.tar.gz tk-f90d5c574cba21880fecf57f844dacb6097a242f.tar.bz2 |
Bug in float emulation for MS-VC6: map fabsf() to fabs(), not abs(). Add float emulation for MS-VC8. Thanks to Auriocus to point out the bug.
Diffstat (limited to 'generic/nanosvg.h')
-rwxr-xr-x | generic/nanosvg.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/nanosvg.h b/generic/nanosvg.h index ade6ec7..b449dc2 100755 --- a/generic/nanosvg.h +++ b/generic/nanosvg.h @@ -91,13 +91,17 @@ extern "C" { #define cosf(a) (float)cos(a) #define sinf(a) (float)sin(a) #define sqrtf(a) (float)sqrt(a) -#define fabsf(a) (float)abs(a) +#define fabsf(a) (float)fabs(a) #define acosf(a) (float)acos(a) #define atan2f(a,b) (float)atan2(a,b) #define ceilf(a) (float)ceil(a) #define fmodf(a,b) (float)fmod(a,b) #define floorf(a) (float)floor(a) #endif +// float emulation for MS VC8++ compiler +#if (_MSC_VER == 1400) +#define fabsf(a) (float)fabs(a) +#endif enum NSVGpaintType { NSVG_PAINT_NONE = 0, |