diff options
author | Nico Weber <nicolasweber@gmx.de> | 2018-04-05 18:19:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 18:19:05 (GMT) |
commit | e85f5ac86be249e6472b368ee7abbe98fe01bcd2 (patch) | |
tree | e01bbcc3277a9772c8f2a3f981305f45fb7662d1 /src/util.cc | |
parent | 26341ca0d652b6e50aa57fa176bf610480be5edd (diff) | |
parent | 59849864592b421e0a8f993011e7e5c2ab27e77b (diff) | |
download | Ninja-e85f5ac86be249e6472b368ee7abbe98fe01bcd2.zip Ninja-e85f5ac86be249e6472b368ee7abbe98fe01bcd2.tar.gz Ninja-e85f5ac86be249e6472b368ee7abbe98fe01bcd2.tar.bz2 |
Merge pull request #1348 from ngg/winunicode
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; |