[libvirt] [PATCH] Put <stdbool.h> into internal.h so it is available everywhere

Eric Blake eblake at redhat.com
Wed Feb 23 15:02:01 UTC 2011


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".

If we go with this approach, shouldn't we also ensure that all .c files
include "internal.h"?

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110223/64d06e2c/attachment-0001.sig>


More information about the libvir-list mailing list