From f3ae05f9e18474fc676e130b0bf6d8263b7ee301 Mon Sep 17 00:00:00 2001 From: lahiker42 Date: Thu, 11 Jun 2009 12:50:42 +0000 Subject: [PATCH] misc. git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@189 00440858-1255-0410-a3e6-75ea37f81c3a --- ChangeLog | 5 +++++ configure.ac | 10 ++++++++++ src/google/protobuf/compiler/c/c_service.cc | 6 ------ src/google/protobuf/compiler/c/c_service.h | 1 - 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3212eab..be93a78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ - fix technically possible overflows during unpack of very large messages (Andrei Nigmatulin) - [UNFINISHED] windows RPC work + - use automake's "foreign" mode from within configure.ac + and add version information to the library (Robert Edmonds) + - ProtobufCServiceDescriptor::method_indices_by_name: missing + const. (Issue 21) + - Update to support new UnknownFields API. (fix by dcreager) (Issue 20) 0.10: - build issue on platforms which don't compute library dependencies diff --git a/configure.ac b/configure.ac index a002b41..b8f4d5a 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,16 @@ perhaps you need to add -Llibdir to your LDFLAGS.])]) LIBS="$pbc_savelibs" AC_LANG_POP() +dnl Determine the version of the protoc compiler. + +if test -n $PROTOC; then + AC_MSG_CHECKING([which version of protoc is installed]) + raw_vers=`protoc --version 2>/dev/null | sed -e 's/libprotoc //'` + vers=`echo $raw_vers | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + AC_DEFINE_UNQUOTED([PROTOC_VERSION], [$vers]) + AC_MSG_RESULT([$raw_vers]) +fi + dnl ------ define IS_LITTLE_ENDIAN ------ # We try to use, where possible the headers , , diff --git a/src/google/protobuf/compiler/c/c_service.cc b/src/google/protobuf/compiler/c/c_service.cc index fd70979..a85fbdf 100644 --- a/src/google/protobuf/compiler/c/c_service.cc +++ b/src/google/protobuf/compiler/c/c_service.cc @@ -53,7 +53,6 @@ void ServiceGenerator::GenerateMainHFile(io::Printer* printer) { GenerateVfuncs(printer); GenerateInitMacros(printer); - GenerateCreateServiceDeclaration(printer); GenerateCallersDeclarations(printer); } void ServiceGenerator::GenerateVfuncs(io::Printer* printer) @@ -120,11 +119,6 @@ void ServiceGenerator::GenerateCallersDeclarations(io::Printer* printer) } } -void ServiceGenerator::GenerateCreateServiceDeclaration(io::Printer* printer) -{ - printer->Print(vars_, "ProtobufCService *$lcfullname$__create_service ($cname$_Service *service);\n"); -} - void ServiceGenerator::GenerateDescriptorDeclarations(io::Printer* printer) { printer->Print(vars_, "extern const ProtobufCServiceDescriptor $lcfullname$__descriptor;\n"); diff --git a/src/google/protobuf/compiler/c/c_service.h b/src/google/protobuf/compiler/c/c_service.h index 6ec1875..8553648 100644 --- a/src/google/protobuf/compiler/c/c_service.h +++ b/src/google/protobuf/compiler/c/c_service.h @@ -49,7 +49,6 @@ class ServiceGenerator { void GenerateMainHFile(io::Printer* printer); void GenerateVfuncs(io::Printer* printer); void GenerateInitMacros(io::Printer* printer); - void GenerateCreateServiceDeclaration(io::Printer* printer); void GenerateDescriptorDeclarations(io::Printer* printer); void GenerateCallersDeclarations(io::Printer* printer);