--- a/ptw32_relmillisecs.c
+++ b/ptw32_relmillisecs.c
@@ -57,7 +57,8 @@
   FILETIME ft;
   SYSTEMTIME st;
 #else /* ! NEED_FTIME */
-#if (defined(__MINGW64__) || defined(__MINGW32__)) && __MSVCRT_VERSION__ >= 0x0601
+#if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) || \
+    ( (defined(__MINGW64__) || defined(__MINGW32__)) && __MSVCRT_VERSION__ >= 0x0601 )
   struct __timeb64 currSysTime;
 #else
   struct _timeb currSysTime;
@@ -98,9 +99,10 @@
 
 #else /* ! NEED_FTIME */
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER >= 1400
   _ftime64_s(&currSysTime);
-#elif (defined(__MINGW64__) || defined(__MINGW32__)) && __MSVCRT_VERSION__ >= 0x0601
+#elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) || \
+      ( (defined(__MINGW64__) || defined(__MINGW32__)) && __MSVCRT_VERSION__ >= 0x0601 )
   _ftime64(&currSysTime);
 #else
   _ftime(&currSysTime);