aboutsummaryrefslogtreecommitdiff
path: root/contrib/protoc-bnet/BnetFileGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/protoc-bnet/BnetFileGenerator.cpp')
-rw-r--r--contrib/protoc-bnet/BnetFileGenerator.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/protoc-bnet/BnetFileGenerator.cpp b/contrib/protoc-bnet/BnetFileGenerator.cpp
index 92f836fad31..24e3a6ef63b 100644
--- a/contrib/protoc-bnet/BnetFileGenerator.cpp
+++ b/contrib/protoc-bnet/BnetFileGenerator.cpp
@@ -173,6 +173,9 @@ void BnetFileGenerator::GenerateHeader(pb::io::Printer* printer)
printer->Print("#include <functional>\n");
printer->Print("#include <type_traits>\n");
}
+ else
+ printer->Print("#include \"Define.h\" // for TC_SHARED_API\n");
+
printer->Print("// @@protoc_insertion_point(includes)\n");
@@ -356,6 +359,11 @@ void BnetFileGenerator::GenerateSource(pb::io::Printer* printer)
printer->Print(
"// @@protoc_insertion_point(includes)\n");
+ printer->Print("\n// Fix stupid windows.h included from Log.h->Common.h\n");
+ printer->Print("#ifdef SendMessage\n");
+ printer->Print("#undef SendMessage\n");
+ printer->Print("#endif\n");
+
GenerateNamespaceOpeners(printer);
if (pbcpp::HasDescriptorMethods(file_))