Commit graph

217 commits

Author SHA1 Message Date
David Lamparter
811d3046e1 rename to "[lib]capnp_c", use lib/ subdir 2016-03-19 00:39:29 +01:00
David Lamparter
d3b1cad50f compiler: regenerate schema.c with enum/int cast 2016-03-19 00:39:25 +01:00
David Lamparter
41462901df lib: fix warning on uint16->enum cast 2016-03-19 00:36:24 +01:00
David Lamparter
332076e522 Fix empty-object pointers
Pointers are written as offsets to the segment start;  leaving p->data
as NULL results in invalid pointers for zero-size objects (particularly,
lists.)
2016-03-08 14:49:10 +01:00
David Lamparter
48ab119048 Travis CI: whatever.
gtest packages intentionally don't provide binaries anymore.
Will probably re-add as submodule later.
2016-02-28 18:38:41 +01:00
David Lamparter
c92a985849 Fix Travis CI even more...
automake 1.11 is sufficient (and what's installed by default on CI
boxes).  Also disable cap'n proto reference (it's not actually used)
2016-02-28 18:31:43 +01:00
David Lamparter
c02d6d59d0 Fix up Travis CI
... it doesn't autodetect that it needs to run autoreconf
Also add gtest package.
2016-02-28 18:26:35 +01:00
David Lamparter
663cfe2d23 Update Travis icon URL 2016-02-28 18:23:23 +01:00
David Lamparter
b18d178884 Remove "script" spec from travis.yml
Travis should autodetect & do the right thing for autoconf projects...
2016-02-28 18:20:23 +01:00
David Lamparter
89818b0286 tack on autoconf/automake build 2016-02-28 13:55:23 +01:00
David Lamparter
34f150dc1c Update merged forks 2016-02-28 12:52:38 +01:00
David Lamparter
56753b053f fold 2 readme files 2016-02-28 12:51:01 +01:00
David Lamparter
ae746a3e08 add approprate per-file license headers 2016-02-28 12:47:42 +01:00
David Lamparter
06f6e98d12 Tag 640Labs as merged
(No changes in 640Labs that are useful to merge -- just mark as merged.)
2016-02-28 12:44:55 +01:00
David Lamparter
b55d847db6 Re-fix signed/unsigned warnings 2016-02-28 12:42:52 +01:00
David Lamparter
02268ff818 Merge branch 'kylemanna' into merge
Conflicts: (manually resolved)
	capn-malloc.c
	capn-stream.c
	capn-test.cpp
	capn.c
	capn.h
	compiler/capnpc-c.c
2016-02-28 12:32:59 +01:00
David Lamparter
aeeae64900 Revert "gtest: Use system gtest and pthread libs"
This reverts commit 9fe7167920.

(this makes the following merge easier)
2016-02-28 12:19:44 +01:00
David Lamparter
0ddba4f2f1 Merge branch 'baruch' into merge
Conflicts:
	Makefile		-- manually resolved
	compiler/schema.capnp	-- used from liamstask
	compiler/test.capnp	-- used from liamstask
2016-02-28 12:17:57 +01:00
David Lamparter
da77dcc452 Partial revert "all: use unsigned types for more variables that represent length"
This reverts commit 0b6f95294e.

(for merge)
2016-02-28 12:15:12 +01:00
David Lamparter
d87beb1a09 gtest: use installed package, drop files
(also makes the next merge much easier)
2016-02-28 12:08:28 +01:00
David Lamparter
6ebc0682eb gtest: use installed package, drop files
(also makes the next merge much easier)
2016-02-28 12:08:10 +01:00
Kyle Manna
6ebba52da2 capn: Avoid uninitialized values
* Return null when appropriate and assign a value earlier.
2015-08-17 18:53:16 -07:00
Kyle Manna
376b63fb81 signedness: Fix less obvious issues
* My compilers mark these as errors
* Attempt to be more correct
* Tested on gcc-5.2.0 and clang-3.6.2
2015-08-17 18:52:36 -07:00
Kyle Manna
e933510236 compiler: Fix missing comments
* Later versions of compilers/pre-processors are upset about the syntax
* Bracket unterminated string with proper comment tags
2015-08-17 18:50:53 -07:00
Kyle Manna
5b3e8f1132 test: Remove unused variables
* Never referenced and generate warnings on modern compilers
* Tested on gcc-5.2.0 and clang-3.6.2
2015-08-17 18:49:48 -07:00
Kyle Manna
7d2e122f2f signedness: Fix obvious sign problems
* These should be easily verified as correct.
* Tested on gcc-5.2.0 and clang-3.6.2
2015-08-17 18:48:17 -07:00
Kyle Manna
9fe7167920 gtest: Use system gtest and pthread libs
* Rip out the gtest built in here.  Use the system library.
* Test against gtest-1.7.0-1 on Arch Linux
* Add the missing -lpthread library
2015-08-17 18:44:31 -07:00
Liam Staskawicz
e67affe8cf Merge pull request #3 from liamstask/update-v0.5.2
compiler: updates to upstream v0.5.2
2015-08-04 12:23:52 -07:00
Liam Staskawicz
cdf7e1f007 compiler: notes on updating from upstream 2015-08-04 12:04:49 -07:00
Liam Staskawicz
fadac15a4c init_fp(): add comment that clarifies that it expects input to be in standard framing format 2015-08-04 11:56:18 -07:00
Liam Staskawicz
560366c7d4 compiler: introduce workaround for annotation ids in nestednode list (see comments), and regenerate schema .{c|h} files based on capnproto v0.5.2 2015-08-04 11:56:00 -07:00
Liam Staskawicz
98c2d02744 compiler: update schemas from v0.5.2 2015-08-04 11:55:23 -07:00
Liam Staskawicz
593b356cda Merge pull request #2 from liamstask/travis-improvement
travis: remove sudo requirement for faster builds
2015-08-04 11:14:21 -07:00
Liam Staskawicz
e3af4b4570 travis: remove sudo requirement in order to be able to build on faster container system 2015-08-04 11:11:54 -07:00
Liam Staskawicz
8585d869cb readme: super brief info 2015-08-04 11:00:26 -07:00
Liam Staskawicz
be7a4963a3 Merge pull request #1 from liamstask/travis-clean
Travis build support
2015-08-04 10:57:47 -07:00
Liam Staskawicz
0b6f95294e all: use unsigned types for more variables that represent length
resolve build warnings on multiple platforms/toolchains
2015-08-04 10:44:22 -07:00
Liam Staskawicz
125c638c11 unreal: gcc complains about missing ‘ character in #if 0 block 2015-08-04 10:25:08 -07:00
Liam Staskawicz
28e13e55d7 build: require c++11 for gtest, and link test exe against pthreads (linux build fails without it) 2015-08-04 10:24:57 -07:00
Liam Staskawicz
94de39fd6b travis: prelim auto build support 2015-08-04 10:21:22 -07:00
Liam Staskawicz
6b3657437d capn-test: remove unreferenced code, now builds cleanly
previously, this was emitting the following warning (treated as error):

`c++ -g -Wall -Werror -I. -Igtest-1.7.0/include -o capn-test.o -c capn-test.cpp
capn-test.cpp:66:29: error: unused variable 'SUBSTRUCT_DEFAULT' [-Werror,-Wunused-const-variable]
static const AlignedData<2> SUBSTRUCT_DEFAULT = {{0,0,0,0,1,0,0,0,  0,0,0,0,0,0,0,0}};
                            ^
capn-test.cpp:67:29: error: unused variable 'STRUCTLIST_ELEMENT_SUBSTRUCT_DEFAULT' [-Werror,-Wunused-const-variable]
static const AlignedData<2> STRUCTLIST_ELEMENT_SUBSTRUCT_DEFAULT =
                            ^`
2015-07-29 22:48:23 -07:00
Liam Staskawicz
97dcc053ef gtest: remove modified gtest-all-test.cpp, and build unmodified, vendored gtest-all.cpp
builds cleanly (minus a couple warnings in the test code itself) on OS X 10.10.4 with “Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)”
2015-07-29 22:45:20 -07:00
Liam Staskawicz
8865b6d917 gtest: vendor v1.7.0, latest release from https://code.google.com/p/googletest/downloads/list
no changes to existing code
2015-07-29 22:40:30 -07:00
Greg Sherwood
c653dda6a0 added symlink to gtest-all-test 2015-01-04 10:58:44 -06:00
Greg Sherwood
232cef8ffa some compile cleanup 2015-01-04 10:55:04 -06:00
Baruch Even
2bdc5c476a Implement capn_write_fd 2014-08-07 17:56:51 +03:00
Baruch Even
440c662c66 Implement packed memory write
This uses the capn_deflate function.

The current use may get smaller packing than the maximum possible due to
the inability to peak around segments as it packs each segment on its
own. This saves time compared to copying everything into one place and
saves effort by not requiring to change the interface of capn_deflate to
support multiple different buffers.

It should be possible to make the capn_deflate state machine better to
handle the multiple buffers case too.
2014-08-06 22:29:51 +03:00
Baruch Even
a83769f44d Fix use of wrong offset in buffer
The header of packing is a single byte and nothing was written to the
first byte anyway.
2014-08-06 22:28:24 +03:00
Baruch Even
24ec009d67 Use constants where possible
The hdr variable gets the same constants as value but it is easier to
understand that the constants are used than the hdr which needs to be
traced to the value it received.
2014-08-06 22:28:24 +03:00
Baruch Even
a46581a35e Move initialization closer to use
Should make it a bit more readable, the variable is used before that
case as well but doesn't require the zero initialization in that case.
2014-08-06 22:28:24 +03:00