diff options
author | Gergely Nagy <ngg@ngg.hu> | 2017-10-31 13:10:07 (GMT) |
---|---|---|
committer | Gergely Nagy <ngg@ngg.hu> | 2017-10-31 13:10:07 (GMT) |
commit | 59849864592b421e0a8f993011e7e5c2ab27e77b (patch) | |
tree | 207b1887bb23b7052a4e6ca2f3e2df05040cb049 /src/util.cc | |
parent | e234a7bdb6c42f4539c0ab09b624f191287c2c10 (diff) | |
download | Ninja-59849864592b421e0a8f993011e7e5c2ab27e77b.zip Ninja-59849864592b421e0a8f993011e7e5c2ab27e77b.tar.gz Ninja-59849864592b421e0a8f993011e7e5c2ab27e77b.tar.bz2 |
Fix building on Windows in UNICODE mode
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/util.cc b/src/util.cc index ae94d34..61a038b 100644 --- a/src/util.cc +++ b/src/util.cc @@ -318,13 +318,8 @@ int ReadFile(const string& path, string* contents, string* err) { // This makes a ninja run on a set of 1500 manifest files about 4% faster // than using the generic fopen code below. err->clear(); - HANDLE f = ::CreateFile(path.c_str(), - GENERIC_READ, - FILE_SHARE_READ, - NULL, - OPEN_EXISTING, - FILE_FLAG_SEQUENTIAL_SCAN, - NULL); + HANDLE f = ::CreateFileA(path.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL); if (f == INVALID_HANDLE_VALUE) { err->assign(GetLastErrorString()); return -ENOENT; |