[ccan] [RFC] ccan: rename config file to ccan_config.h

Emilio G. Cota cota at braap.org
Mon Mar 17 15:13:45 EST 2014


On Sun, Mar 16, 2014 at 21:31:16 +1030, Rusty Russell wrote:
> "Emilio G. Cota" <cota at braap.org> writes:
> > From: "Emilio G. Cota" <cota at braap.org>
> >
> > This avoids clashes with library users' code, who might
> > have already a config.h header file.
> 
> But why would they want a separate one for CCAN?  That's just fraught
> with danger.
> 
> For example, there's nothing wrong with your config.h including
> ccan/ccan_config.h.

I'm not sure we're understanding each other. Let me explain in
more detail.

The itch that started this RFC is my current setup, which is
admittedly  of questionable resilience. Out of laziness I just have
ccan as a git submodule of a parent git repo. The Makefile in this
parent project just depends on ccan/libccan.a, and if it cannot
find it, it does `make -C ccan'. gcc in the parent project is then
invoked with "-Iccan", so that "#include <ccan/foo/foo.h>" works.

So, since I'm relying on the makefiles on ccan (and on its generated
config.h), my parent project has trouble if it tries to create a config.h
file. Note: this new config.h file is not meant to have anything to do
with CCAN. I'm not sure I made this clear in my original post.

I imagined I wouldn't be the only one relying on ccan's makefiles,
which in practice ends up exposing the auto-generated config.h as a
"library header file", hence the RFC to rename the header to something
more unique.

Thanks,

		Emilio



More information about the ccan mailing list