aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/command_line_interface.cc
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2015-07-26 17:07:22 -0700
committerYohei Yukawa <yukawa@google.com>2015-07-30 18:10:17 -0700
commit8c27eea686deb85bc61a5bb47a2a5804e731ee05 (patch)
treebdaa199c67c7fea721c028aaaa8f70c1c3d688ae /src/google/protobuf/compiler/command_line_interface.cc
parent1647e63c57e2c2216da648e967686649e42a6346 (diff)
downloadprotobuf-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/google/protobuf/compiler/command_line_interface.cc')
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc2
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;