]> granicus.if.org Git - re2c/commitdiff
Use macro _MSC_VER instead of nonexistent _MSVC to detect Visual Studio.
authorUlya Trofimovich <skvadrik@gmail.com>
Wed, 6 Mar 2019 07:07:51 +0000 (07:07 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Wed, 6 Mar 2019 07:07:51 +0000 (07:07 +0000)
re2c/src/util/temp_file.cc

index 97ebbbe727597d4673075785a61c0c4216253202..c62fa445439318fa81c4485b0202b06f6e6d2b6d 100644 (file)
@@ -4,7 +4,7 @@
 #include "src/util/temp_file.h"
 
 
-#if !defined(_MSVC) \
+#if !defined(_MSC_VER) \
     && defined(HAVE_FCNTL_H) \
     && defined(HAVE_SYS_STAT_H) \
     && defined(HAVE_SYS_TYPES_H) \
@@ -19,8 +19,9 @@
 #define FDOPEN(fd) fdopen(fd, "w")
 #define CLOSE(fd)  close(fd)
 
-#elif defined(_MSVC) \
-    && defined(HAVE_IO_H)
+#elif defined(_MSC_VER) \
+    && defined(HAVE_IO_H) \
+    && defined(HAVE_FCNTL_H)
 
 // MSVC
 #include <io.h>