diff options
author | pliard@google.com <pliard@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2012-10-02 00:15:46 +0000 |
---|---|---|
committer | pliard@google.com <pliard@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2012-10-02 00:15:46 +0000 |
commit | 75575df086cd66e3f2bd7590d828ff69b2dac46b (patch) | |
tree | a8058640134338dc93802aeb3b3bd82c34826397 | |
parent | 3d46dad1d20007c8399c71af4d02d0c57092e94a (diff) | |
download | protobuf-75575df086cd66e3f2bd7590d828ff69b2dac46b.tar.gz protobuf-75575df086cd66e3f2bd7590d828ff69b2dac46b.tar.bz2 protobuf-75575df086cd66e3f2bd7590d828ff69b2dac46b.zip |
Generate missing inclusion of common.h.
FileGenerator::GenerateBuildDescriptors() emits
"::google::protobuf::internal::OnShutdown(&$shutdownfilename$);" which is
declared in common.h.
Although Protobuf is very well tested a compilation error was triggered while
rolling Protobuf r423:426. There might be something wrong in the Chromium roll
(still in progress).
It seems safer anyway not to rely on indirect headers inclusion.
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_file.cc | 1 | ||||
-rw-r--r-- | src/google/protobuf/compiler/plugin.pb.cc | 1 | ||||
-rw-r--r-- | src/google/protobuf/descriptor.pb.cc | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc index 1bbc89c4..cfe96c8a 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -310,6 +310,7 @@ void FileGenerator::GenerateSource(io::Printer* printer) { "\n" "#include <algorithm>\n" // for swap() "\n" + "#include <google/protobuf/stubs/common.h>\n" "#include <google/protobuf/stubs/once.h>\n" "#include <google/protobuf/io/coded_stream.h>\n" "#include <google/protobuf/wire_format_lite_inl.h>\n", diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index bc0c1f17..65abeafc 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -6,6 +6,7 @@ #include <algorithm> +#include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index bb438f25..65379f4d 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -6,6 +6,7 @@ #include <algorithm> +#include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> |