[flang-commits] [flang] 8cfe9c0 - [Flang] Fix compilation on MinGW-w64
Michael Kruse via flang-commits
flang-commits at lists.llvm.org
Wed Feb 17 19:53:58 PST 2021
Author: Mehdi Chinoune
Date: 2021-02-17T21:53:48-06:00
New Revision: 8cfe9c02a0430e604bfec520caaea0e5d61ed399
URL: https://github.com/llvm/llvm-project/commit/8cfe9c02a0430e604bfec520caaea0e5d61ed399
DIFF: https://github.com/llvm/llvm-project/commit/8cfe9c02a0430e604bfec520caaea0e5d61ed399.diff
LOG: [Flang] Fix compilation on MinGW-w64
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D94707
Added:
Modified:
flang/runtime/file.cpp
flang/tools/flang-driver/driver.cpp
Removed:
################################################################################
diff --git a/flang/runtime/file.cpp b/flang/runtime/file.cpp
index fa59567f6c10..73b7a24324da 100644
--- a/flang/runtime/file.cpp
+++ b/flang/runtime/file.cpp
@@ -14,12 +14,12 @@
#include <cstring>
#include <fcntl.h>
#include <stdlib.h>
+#include <sys/stat.h>
#ifdef _WIN32
#define NOMINMAX
#include <io.h>
#include <windows.h>
#else
-#include <sys/stat.h>
#include <unistd.h>
#endif
diff --git a/flang/tools/flang-driver/driver.cpp b/flang/tools/flang-driver/driver.cpp
index e00320096f38..19ac6df7fea3 100644
--- a/flang/tools/flang-driver/driver.cpp
+++ b/flang/tools/flang-driver/driver.cpp
@@ -131,7 +131,7 @@ int main(int argc_, const char **argv_) {
// information if possible.
isCrash = CommandRes < 0;
#ifdef _WIN32
- IsCrash |= CommandRes == 3;
+ isCrash |= CommandRes == 3;
#endif
if (isCrash) {
theDriver.generateCompilationDiagnostics(*c, *failingCommand);
More information about the flang-commits
mailing list