summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Mellbin <fredrik.mellbin@gmail.com>2015-09-27 01:18:31 +0200
committerAliaksey Kandratsenka <alk@tut.by>2015-10-03 14:54:40 -0700
commit121038308d8c5b34707614c44de265816a322563 (patch)
tree4273f2ffd8f3fa9aa916c4920b7bbce00b601303
parent73673229955cf35c5b3046ee3100d94e82d33bc2 (diff)
downloadgperftools-121038308d8c5b34707614c44de265816a322563.tar.gz
Check if _MSC_VER is defined to avoid warnings
-rw-r--r--src/windows/port.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/windows/port.h b/src/windows/port.h
index 0350f45..87db9dd 100644
--- a/src/windows/port.h
+++ b/src/windows/port.h
@@ -64,7 +64,7 @@
#include <assert.h>
#include <stdlib.h> /* for rand, srand, _strtoxxx */
-#if _MSC_VER >= 1900
+#if defined(_MSC_VER) && _MSC_VER >= 1900
#define _TIMESPEC_DEFINED
#include <time.h>
#endif
@@ -461,7 +461,7 @@ inline int nanosleep(const struct timespec *req, struct timespec *rem) {
#endif
#ifndef __MINGW32__
-#if _MSC_VER < 1800
+#if defined(_MSC_VER) && _MSC_VER < 1800
inline long long int strtoll(const char *nptr, char **endptr, int base) {
return _strtoi64(nptr, endptr, base);
}