From 91ff856c6b8c33b8973d94e60a24ca46902bb7a9 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Wed, 6 Mar 2019 07:07:51 +0000 Subject: [PATCH] Use macro _MSC_VER instead of nonexistent _MSVC to detect Visual Studio. --- re2c/src/util/temp_file.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/re2c/src/util/temp_file.cc b/re2c/src/util/temp_file.cc index 97ebbbe7..c62fa445 100644 --- a/re2c/src/util/temp_file.cc +++ b/re2c/src/util/temp_file.cc @@ -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 -- 2.40.0