[PATCH] D94707: [Flang] Fix compilation on MinGW-w64
مهدي شينون (Mehdi Chinoune) via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 03:04:26 PST 2021
ChinouneMehdi added a comment.
In D94707#2500131 <https://reviews.llvm.org/D94707#2500131>, @mstorsjo wrote:
> What part of the code in the ifdefs is msvc-specific? On a first glance, it looks like regular win32 code that should work fine on mingw. What's the error that it tries to fix?
D:/dev/llvm-project/flang/runtime/file.cpp:48:57: error: use of undeclared identifier '_S_IREAD'
int fd{::_open(tempFileName, _O_CREAT | _O_TEMPORARY, _S_IREAD | _S_IWRITE)};
^
D:/dev/llvm-project/flang/runtime/file.cpp:48:68: error: use of undeclared identifier '_S_IWRITE'
int fd{::_open(tempFileName, _O_CREAT | _O_TEMPORARY, _S_IREAD | _S_IWRITE)};
^
D:/dev/llvm-project/flang/runtime/file.cpp:404:9: warning: 'F_OK' macro redefined [-Wmacro-redefined]
#define F_OK 00
^
D:\Programs\msys64\mingw64\x86_64-w64-mingw32\include\io.h:182:9: note: previous definition is here
#define F_OK 0 /* Check for file existence */
^
D:/dev/llvm-project/flang/runtime/file.cpp:405:9: warning: 'W_OK' macro redefined [-Wmacro-redefined]
#define W_OK 02
^
D:\Programs\msys64\mingw64\x86_64-w64-mingw32\include\io.h:184:9: note: previous definition is here
#define W_OK 2 /* Check for write permission */
^
D:/dev/llvm-project/flang/runtime/file.cpp:406:9: warning: 'R_OK' macro redefined [-Wmacro-redefined]
#define R_OK 04
^
D:\Programs\msys64\mingw64\x86_64-w64-mingw32\include\io.h:185:9: note: previous definition is here
#define R_OK 4 /* Check for read permission */
^
4 warnings and 2 errors generated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94707/new/
https://reviews.llvm.org/D94707
More information about the llvm-commits
mailing list