protoc-c/c_file.cc: Remove HAVE_PROTO3 conditional

This commit is contained in:
Robert Edmonds 2023-07-08 23:13:59 -04:00
parent 5c4be20f1b
commit 7ed03a715b

View File

@ -118,15 +118,13 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
std::string filename_identifier = FilenameIdentifier(file_->name()); std::string filename_identifier = FilenameIdentifier(file_->name());
int min_header_version = 1000000; int min_header_version = 1000000;
#if defined(HAVE_PROTO3) #if GOOGLE_PROTOBUF_VERSION >= 4023000
# if GOOGLE_PROTOBUF_VERSION >= 4023000
if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) { if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) {
# else #else
if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) { if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) {
#endif #endif
min_header_version = 1003000; min_header_version = 1003000;
} }
#endif
// Generate top of header. // Generate top of header.
printer->Print( printer->Print(