diff options
author | Yohei Yukawa <yukawa@google.com> | 2015-07-26 17:07:22 -0700 |
---|---|---|
committer | Yohei Yukawa <yukawa@google.com> | 2015-07-30 18:10:17 -0700 |
commit | 8c27eea686deb85bc61a5bb47a2a5804e731ee05 (patch) | |
tree | bdaa199c67c7fea721c028aaaa8f70c1c3d688ae /src | |
parent | 1647e63c57e2c2216da648e967686649e42a6346 (diff) | |
download | protobuf-8c27eea686deb85bc61a5bb47a2a5804e731ee05.tar.gz protobuf-8c27eea686deb85bc61a5bb47a2a5804e731ee05.tar.bz2 protobuf-8c27eea686deb85bc61a5bb47a2a5804e731ee05.zip |
Fix build failure on Windows when Unicode build is enabled.
This is a follow up CL for e9abc404df99ef85d3e25aaaccd4aa83e381,
which breaks build when UNICODE macro is defined.
protoc has explicitly called MBCS version of APIs / funcsions
rather than UTF-16 (wchar_t) version of them regardless of
UNICODE macro definition (and it indeed works as expected).
Hence it makes sense to call GetModuleFileNameA explicitly.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/command_line_interface.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc index c57cfd3d..e8871861 100644 --- a/src/google/protobuf/compiler/command_line_interface.cc +++ b/src/google/protobuf/compiler/command_line_interface.cc @@ -189,7 +189,7 @@ bool TryCreateParentDirectory(const string& prefix, const string& filename) { bool GetProtocAbsolutePath(string* path) { #ifdef _WIN32 char buffer[MAX_PATH]; - int len = GetModuleFileName(NULL, buffer, MAX_PATH); + int len = GetModuleFileNameA(NULL, buffer, MAX_PATH); #elif __APPLE__ char buffer[PATH_MAX]; int len = 0; |