dave's original style drives me crazy. reformat the C code in
protobuf-c/ with "indent -kr -i8" and manually reflow for readability.
try to fit most lines in 80 columns, but due to the lengthy type and
function names in protobuf-c, enforcing an 80 column rule would result
in a lot of cramped statements, so try to fit lines in up to 100 columns
if it would improve readability. (e.g., one <=100 column line is
probably better than 3-4 <=80 column lines.)
ultimately i'd like to adopt most of the recommendations in the linux
coding style: https://www.kernel.org/doc/Documentation/CodingStyle.
this commit gets us most of the kernel indentation and comment coding
style recommendations. later commits will tackle style recommendations
that require more intrusive changes: breaking up large functions,
replacing macros that affect control flow (e.g., DO_ALLOC). this will
hopefully facilitate review and make the code base easier to maintain.
i ran the old and new versions of protobuf-c.c through something like:
gcc -S -D__PRETTY_FUNCTION__=0 -D__FILE__=0 -D__LINE__=0 -Wall -O0 \
-o protobuf-c.S -c protobuf-c.c
and reviewed the diffs of the assembly output to spot any functions that
changed, and went back to make sure that any differences were
functionally equivalent.
of the same field on the wire (Fixes#91)
t/generated-code2/test-generated-code2.c: add a test case for merging
messages
t/test-full.proto: expand message definitions to test for merging nested
messages
per https://code.google.com/p/protobuf/source/detail?r=50, the license
on google-originated protobuf code was switched from Apache-2.0 to
BSD-3-Clause (so-called "New BSD" license). update any of the google
license statements to use this new license.
per email with dave, drop the third clause on his BSD-3-Clause license,
so this now becomes BSD-2-Clause.
make sure to use consistent indentation and wrapping throughout.
the change that required protobuf >= 2.5.0 has been reverted, so there's
no need to build protobuf from source. use the system protobuf packages
instead.
also use distcheck to build and check the distribution. this will run
the test suite and perform various other checks. it will also perform a
VPATH build using the distribution tarball, which will catch any files
present in the git repository but inadvertently not distributed in the
tarball.
also test the build when configured with "--enable-rpc".
for some reason, "make distcheck" fails when the build is configured
with --disable-protoc. i haven't been able to track down the root cause
(it appears the build is trying to generate the generated pb-c files for
the test cases, but the test cases should be disabled when
--disable-protoc is specified). so, remove the --disable-protoc option.
libprotobuf-c should always be tested as part of a build, and this can't
be done unless protoc-c is built. this also reduces the number of build
combinations that need to be tested.
this option is only supported by the upstream protobuf compiler starting
with version 2.5.0. this version is not yet widely available in the
debian/ubuntu repositories, and we would like to avoid breaking the
build on those platforms with the distribution version of protobuf
installed, so revert the following commits:
- 5ee9c03478ea13bba03e7d7edacf723f324200c2
- 84e41e7329f1f0fc09b41ee96e17b28a792cefcf