]> git.ozlabs.org Git - ccan/commitdiff
ccan: Correct some poor conventions in _info includes
authorDavid Gibson <david@gibson.dropbear.id.au>
Sun, 15 Jun 2014 14:09:09 +0000 (00:09 +1000)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 16 Jun 2014 11:42:44 +0000 (21:12 +0930)
There are a couple of small problems with the includes used in most of
ccan's _info files.

   * _info routinely uses printf(), and so should include <stdio.h>, but
only some of them do.  We get away with it, because they do include
<string.h>, which apparently includes <stdio.h> indirectly, but we should
be explicit about it.

   * Most _info files were including config.h after the system headers.
That _seems_ sensible, but actually causes problems.  Because config.h
defines _GNU_SOURCE it can change the behaviour of the system headers.
More specifically it can make them behave differently to how the individual
module headers (which have included config.h) expects them to behave.

This patch adjusts all the existing _info files and, more importantly,
the template constructed by ccanlint.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

No differences found