This is an archive of the discontinued LLVM Phabricator instance.

[flang][msvc] Define access flags under Windows. NFC.
ClosedPublic

Authored by Meinersbur on Sep 29 2020, 11:40 AM.

Details

Summary

The flags F_OK, R_OK and W_OK are defined in unistd.h, which does not exist under the Windows platform. Windows still defines the access function. Its access flags are documented at https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess. For compatibility, define the flags F_OK, R_OK and W_OK using these constants.

This patch is part of the series to make flang compilable with MS Visual Studio http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html.

Diff Detail

Event Timeline

Meinersbur created this revision.Sep 29 2020, 11:40 AM
Herald added a project: Restricted Project. · View Herald Transcript
Meinersbur requested review of this revision.Sep 29 2020, 11:40 AM
klausler accepted this revision.Sep 29 2020, 11:43 AM
This revision is now accepted and ready to land.Sep 29 2020, 11:43 AM
This revision was automatically updated to reflect the committed changes.