[ccan] [PATCH] ccan: Correct some poor conventions in _info includes

Rusty Russell rusty at rustcorp.com.au
Mon Jun 16 21:40:38 EST 2014


David Gibson <david at gibson.dropbear.id.au> writes:
> 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 at gibson.dropbear.id.au>

Excellent, thanks!

Cheers,
Rusty.


More information about the ccan mailing list