summaryrefslogtreecommitdiffstats
path: root/generic/nanosvg.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-08 13:54:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-08 13:54:16 (GMT)
commit131eca1c29268703370bf339f09c63b0c756f306 (patch)
tree4c01c25c2e34c6d4ee62d463fb61d95905a6f493 /generic/nanosvg.h
parentf13aa6c87705fae7111ee41caa62cddd5b99f3e0 (diff)
downloadtk-131eca1c29268703370bf339f09c63b0c756f306.zip
tk-131eca1c29268703370bf339f09c63b0c756f306.tar.gz
tk-131eca1c29268703370bf339f09c63b0c756f306.tar.bz2
Make everything compile warning-free using -Wundef
Diffstat (limited to 'generic/nanosvg.h')
-rw-r--r--generic/nanosvg.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/nanosvg.h b/generic/nanosvg.h
index 768dd20..d762f5a 100644
--- a/generic/nanosvg.h
+++ b/generic/nanosvg.h
@@ -86,7 +86,7 @@ extern "C" {
#endif
// float emulation for MS VC6++ compiler
-#if (_MSC_VER == 1200)
+#if defined(_MSC_VER) && (_MSC_VER == 1200)
#define tanf(a) (float)tan(a)
#define cosf(a) (float)cos(a)
#define sinf(a) (float)sin(a)
@@ -99,7 +99,7 @@ extern "C" {
#define floorf(a) (float)floor(a)
#endif
// float emulation for MS VC8++ compiler
-#if (_MSC_VER == 1400)
+#if defined(_MSC_VER) && (_MSC_VER == 1400)
#define fabsf(a) (float)fabs(a)
#endif
@@ -1157,7 +1157,7 @@ static double nsvg__atof(const char* s)
char* cur = (char*)s;
char* end = NULL;
double res = 0.0, sign = 1.0;
-#if (_MSC_VER == 1200)
+#if defined(_MSC_VER) && (_MSC_VER == 1200)
__int64 intPart = 0, fracPart = 0;
#else
long long intPart = 0, fracPart = 0;
@@ -1175,7 +1175,7 @@ static double nsvg__atof(const char* s)
// Parse integer part
if (nsvg__isdigit(*cur)) {
// Parse digit sequence
-#if (_MSC_VER == 1200)
+#if defined(_MSC_VER) && (_MSC_VER == 1200)
intPart = strtol(cur, &end, 10);
#else
intPart = strtoll(cur, &end, 10);
@@ -1192,7 +1192,7 @@ static double nsvg__atof(const char* s)
cur++; // Skip '.'
if (nsvg__isdigit(*cur)) {
// Parse digit sequence
-#if (_MSC_VER == 1200)
+#if defined(_MSC_VER) && (_MSC_VER == 1200)
fracPart = strtol(cur, &end, 10);
#else
fracPart = strtoll(cur, &end, 10);