On Wed, Feb 23, 2011 at 08:02:01AM -0700, Eric Blake wrote:
On 02/23/2011 05:14 AM, Daniel P. Berrange wrote:
> Remove the <stdbool.h> header from all source files / headers
> and just put it into internal.h
>
> * src/internal.h: Add <stdbool.h>
I was about to ACK this, but then I did a spot check:
>
> diff --git a/daemon/dispatch.c b/daemon/dispatch.c
> index 3397a00..dc3b48a 100644
> --- a/daemon/dispatch.c
> +++ b/daemon/dispatch.c
> @@ -26,7 +26,6 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <stdarg.h>
> -#include <stdbool.h>
>
> #include "dispatch.h"
> #include "remote.h"
Huh, dispatch.c doesn't include "internal.h". Nor does dispatch.h or
remote.h. This only compiled because you included "memory.h", which
eventually included "internal.h".
I'm not really seeing that as a problem. This is true for anything from
internal.h, not merely stdbool usage.
If we go with this approach, shouldn't we also ensure that all .c
files
include "internal.h"?
I'm not sure why we need to treat internal.h specially. We rely on
transitively including things everywhere.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|