- 28 May, 2012 1 commit
-
-
Jeremy Kerr authored
Commit a77cc282 causes tools/create-ccan-tree to fail, as it can't build tools/ccan_depends (via `make tools/ccan_depends`) without a configuration header present. This change adds a dependency on config.h, so that the configurator kicks-in prior to building ccan_depends.o. Other tools don't need this dependency, as tools/ccan_depends is built during the Makefile 'include' process. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 17 May, 2012 2 commits
-
-
Rusty Russell authored
We create and upload an example for the web anyway, if people really need it.
-
Jeremy Kerr authored
Add a script to create a ccan source tree for inclusion into projects' distributed code. create-ccan-tree takes a list of ccan modules and copies them, plus any dependent modules, into a target directory. Enough build infrastructure is added to build libccan.a from the ccan modules. Typical usage for my project that uses talloc and read-write-all: lib/ccan.git/tools/create-ccan-tree --exclude-tests \ lib/ccan/ talloc read-write-all - this uses a git submodule in $PWDlib/ccan.git to create a source tree in $PWD/lib/ccan, containing code for talloc and read-write-all. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
-
- 29 Mar, 2012 3 commits
-
-
Rusty Russell authored
Solaris CC seems to support typeof, but not __builtin_types_compatible_p.
-
Rusty Russell authored
cast_const() et. al. are supposed to be a constant expression, so you can do things like: static char *p = cast_const(char *, (const char *)"hello"); Unfortunately, a cast to intptr_t and arithmetic makes suncc reject it as a constant expression. We need the cast, because (1) the expression could be a void *, so we can't just add to it, and (2) gcc complains with -Wcast-qual without it. So instead of adding BUILD_BUG_OR_ZERO, we use a ? :, which keeps everyone happy.
-
Rusty Russell authored
That's a gcc extension.
-
- 27 Mar, 2012 13 commits
-
-
Rusty Russell authored
It still gave a warning on gcc, because casting a char to a char* gives a warning. Not so on sun CC.
-
Rusty Russell authored
Gcc doesn't include unused inline functions, even without -O, but Solaris CC does, so fails to link block_pool where one inline function refers to a non-inline function.
-
Rusty Russell authored
We get away with it on Linux, not on Solaris.
-
Rusty Russell authored
We only support gcc/gcov so far.
-
Rusty Russell authored
This only matters on non-gcc, where ilog functions are not just mapped to builtins.
-
Rusty Russell authored
The Sun C compiler has them, but fails this overzealous check.
-
Rusty Russell authored
Need sys/termios.h for struct winsize.
-
Rusty Russell authored
Needed for FIONREAD.
-
Rusty Russell authored
Sun CC complains.
-
Rusty Russell authored
We have compiler.h for that.
-
Rusty Russell authored
-
Rusty Russell authored
Header file was wrong, suncc gives warning about missing open prototype, causing configurator to fail.
-
Rusty Russell authored
This means we don't create an empty file if configurator fails.
-
- 21 Mar, 2012 1 commit
-
-
Rusty Russell authored
OpenBSD doesn't idempotent-wrap sys/mman.h, so when we #define mmap to an alternative, it fails to compile when sys/mman.h is included again. Workaround is not to #define mmap to add arguments on Open BSD.
-
- 19 Mar, 2012 6 commits
-
-
Rusty Russell authored
-
Rusty Russell authored
Move ccan_dir determination out to its own function, rather than implying it by the first time we get the manifest of a module.
-
Rusty Russell authored
Move ccan_dir determination out to its own function, rather than implying it by the first time we get the manifest of a module.
-
Rusty Russell authored
After the first module we were resetting even the excluded tests, which caused a segfault as they weren't initialized.
-
Rusty Russell authored
Don't assume it's two levels above the module dir, instead look for last "/ccan/" in path. This is an incremental step towards nested module directories.
-
Rusty Russell authored
Other tools will soon want to use this, so make it independent. (eg. ccantool).
-
- 09 Mar, 2012 2 commits
-
-
Rusty Russell authored
-
Rusty Russell authored
Thanks to Zoltán Lajos Kis for the bug report and test case!
-
- 08 Mar, 2012 1 commit
-
-
Rusty Russell authored
This breaks when rlimit is less. Unfortunately, valgrind (32 bit x86, 3.7.0.SVN, Ubuntu) fails to set the file limit properly on the test: reducing it to the obvious getrlimit/setrlimit/getrlimit works fine, so leaving diagnostics for another day.
-
- 26 Feb, 2012 3 commits
-
-
Daniel Burke authored
-
Daniel Burke authored
-
Daniel Burke authored
-
- 14 Feb, 2012 2 commits
-
-
Rusty Russell authored
This was an early experiment in putting code into CCAN, but TDB is a public library distributed as part of the Samba sources; there is no reason to publish it here (especially now the unit tests are also in Samba).
-
Rusty Russell authored
An interesting case came up with the tdb2 code in SAMBA recently. It's a public library, and it doesn't want to be dependent on CCAN, but the header uses cast and typesafe_cb for extra type safety. A good solution to this is to put dummy versions under !HAVE_CCAN. Of course, any CCAN config.h should define HAVE_CCAN.
-
- 28 Jan, 2012 3 commits
-
-
Rusty Russell authored
TDB2 uses the same expansion logic as TDB1, which got factored out recently. So update TDB2 to match.
-
Rusty Russell authored
If we're expanding because the current recovery area is too small, we expand only the amount we need. This can quickly lead to exponential growth when we have a slowly-expanding record (hence a slowly-expanding transaction size). (Syncs with tdb1 SAMBA patch 3a2a755e3380a8f81374009d463cd06161352507)
-
Volker Lendecke authored
(Syncs tdb2 with SAMBA tdb1's 664add17757836c5ee98618aef11371f412b6e44)
-
- 21 Dec, 2011 2 commits
-
-
Rusty Russell authored
It's much harder to wrap a 64-bit tdb2 than a 32-bit tdb1, but we should still take care against bugs. Also, we should *not* cast the length to a size_t when comparing it to the stat result, in case size_t is 32 bit.
-
Rusty Russell authored
I came across a tdb which had wrapped to 4G + 4K, and the contents had been destroyed by processes which thought it only 4k long. Fix this by checking on open, and making tdb_oob() check for wrap itself. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Ported from tdb1 SAMBA commit b64494535dc62f4073fc6302847593ed6e6ec38b)
-
- 20 Dec, 2011 1 commit
-
-
Rusty Russell authored
We allocate a new recovery area by expanding the file. But if the recovery area is already at the end of file (as shown in at least one client case), we can simply expand the record, rather than freeing it and creating a new one.
-