Rusty Russell [Thu, 28 May 2009 03:56:51 +0000 (13:26 +0930)]
From: Joseph Adams <joeyadams3.14159@gmail.com>
I have given my array module a makeover (see attached
array-0.1.tar.bz2 ). Major changes are:
* All the macros have been renamed to flat array_* names. Instead of
Array, AInit, AAppend, etc., it is now array, array_init,
array_append, etc.. This will obviously break any applications
already using the array module (if any); 'renames' is the list of sed
commands I used to make the name changes.
* array (by default) now uses talloc functions instead of regular
malloc/realloc/free.
* All of the array macros have tests now.
Rusty Russell [Sun, 29 Mar 2009 06:01:02 +0000 (16:31 +1030)]
Another Joey fix:
(15:30:58) joeyadams: Also, ccanlint detects "trailing newlines" on empty lines. Is this a bug, or is
it policy?
(15:52:03) joeyadams: In my code, I like to keep blank lines in my routines indented to the associated
level so automatic indent will apply there
Rusty Russell [Sun, 29 Mar 2009 05:53:19 +0000 (16:23 +1030)]
Patch from Joey Adams:
(15:27:11) joeyadams: ccanlint's handle_no_tests apparently has a bug. It makes the test directory with
0600 permissions, so it can't be used. the x bit provides directory listing privilege
(15:27:25) joeyadams: this gives me Permission denied when I try to run it
(15:28:34) joeyadams: Changing the opcode to 0700 makes the creation of run.c work
Rusty Russell [Mon, 16 Mar 2009 06:23:53 +0000 (16:53 +1030)]
Fix warnings for isaac w/ gcc4.1.
Given the types used (uint32_t and uint64_t) many of the masks are unnecessary.
But mainly moving the bit extraction into separate inline functions means the
code is a bit clearer, and we only need to bracket one place.
But because these helpers shared the same names, I split the 32 and
64-bit tests.
Rusty Russell [Mon, 16 Mar 2009 04:48:17 +0000 (15:18 +1030)]
Fix warnings for ilog (see below) gcc 4.1, and testsuite fixes.
(1) Include ilog.h header first (checks that it doesn't need anything else)
(2) Include ilog.c (only api tests don't need this).
Here are the warnings with gcc 4.1:
Running gcc -O3 -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-Wmissing-declarations -Werror -Iccan/ -I. -o ccan/ilog/test/run ccan/ilog/test/run.c ccan/tap/tap.o
In file included from ccan/ilog/test/run.c:2:
ccan/ilog/ilog.h:27:10: error: "LLONG_MAX" is not defined
cc1: warnings being treated as errors
ccan/ilog/test/run.c: In function ‘main’:
ccan/ilog/test/run.c:36: warning: suggest brackets around + or - inside shift
ccan/ilog/test/run.c:55: warning: suggest brackets around + or - inside shift
ccan/ilog/test/run.c:55: warning: suggest brackets around + or - inside shift
ccan/ilog/test/run.c:55: warning: suggest brackets around + or - in operand of &
ccan/ilog/test/run.c:63: warning: suggest brackets around + or - inside shift
ccan/ilog/test/run.c:85: warning: suggest brackets around + or - inside shift
ccan/ilog/test/run.c:85: warning: suggest brackets around + or - inside shift
ccan/ilog/test/run.c:85: warning: suggest brackets around + or - in operand of &
Rusty Russell [Mon, 2 Mar 2009 03:56:29 +0000 (14:26 +1030)]
From: "Timothy B. Terriberry" <tterribe@xiph.org>
Fixes the example module documentation ccanlint outputs. The
missing \n meant that it would not validate its own example as valid
documentation (with no explanation of why it was invalid... but that
would be a much larger patch).
Rusty Russell [Wed, 25 Feb 2009 03:53:15 +0000 (14:23 +1030)]
Major cleanup of makefiles, api tests.
We no longer use libccan for tests, but explicit object lists. This
will catch missing dependencies. API tests *do* get the module object
linked in now.
In addition, makefiles now correctly rebuild when a dependency changes
(gcc's -MD here), and when _info.c changes.