- 27 Mar, 2012 5 commits
-
-
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 3 commits
-
-
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.
-
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).
-
Rusty Russell authored
-
- 19 Dec, 2011 1 commit
-
-
Rusty Russell authored
-
- 16 Dec, 2011 1 commit
-
-
Rusty Russell authored
-
- 15 Dec, 2011 1 commit
-
-
Rusty Russell authored
Recent real usage case showed this leak when we call opt_usage_and_exit: we don't bother freeing before exit. With valgrind, it matters.
-
- 12 Dec, 2011 5 commits
-
-
Andrey Smirnov authored
See https://github.com/rustyrussell/ccan/pull/1#issuecomment-2856561 for details. (Reworked with minor cleanups -- Rusty)
-
Rusty Russell authored
Based on patch by Andrey Smirnov <andrew.smirnov@gmail.com>: There is are certain use-cases when it is necessary to know the offset of the member in a structure's memory layout. One such use-case can be seen in `ccan/list/list.h' in macros `list_for_each' and `list_for_each_safe'. This commit implements said functionality with `container_of_var_off' macro. Renamed container_of_var_off -> container_off_var now we have container_off.
-
Rusty Russell authored
-
Rusty Russell authored
It's convenient to check that the member is the given type, but we can leave that to the callers.
-
Andrey Smirnov authored
Just adding `-g' to list of CFLAGS doesn't make gcc to generate debug information required for macro expansion during debugging. Replacing it with `-g3 -ggdb' rectifies this. (configurator.c commit folded by Rusty)
-
- 07 Dec, 2011 4 commits
-
-
Rusty Russell authored
Nice for distributed option declaration.
-
Rusty Russell authored
Also add #include to AUTODATA_TYPE example, so ccanlint doesn't try to put it inside a function (which works, for this, but gives a warning about unused variables).
-
Rusty Russell authored
Makes things a bit neater.
-
Rusty Russell authored
-