From 50ef6a623e02639fb8c252dfca67691f320e7349 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Wed, 13 Dec 2017 13:40:19 -0800 Subject: [PATCH] Avoid two consecutive underscores in macro name. Fixes https://github.com/google/protobuf/issues/3268 --- src/google/protobuf/compiler/cpp/cpp_file.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc index 1f90ae4393..a922ee977e 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -1145,8 +1145,8 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" "// source: $filename$\n" "\n" - "#ifndef PROTOBUF_$filename_identifier$__INCLUDED\n" - "#define PROTOBUF_$filename_identifier$__INCLUDED\n" + "#ifndef PROTOBUF_$filename_identifier$_INCLUDED\n" + "#define PROTOBUF_$filename_identifier$_INCLUDED\n" "\n" "#include \n", "filename", file_->name(), "filename_identifier", filename_identifier); @@ -1156,7 +1156,7 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, void FileGenerator::GenerateBottomHeaderGuard( io::Printer* printer, const string& filename_identifier) { printer->Print( - "#endif // PROTOBUF_$filename_identifier$__INCLUDED\n", + "#endif // PROTOBUF_$filename_identifier$_INCLUDED\n", "filename_identifier", filename_identifier); }