Re: [PATCH 2/3] syntax-check: Only allows to include public headers in external tools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/17/2013 04:19 AM, Osier Yang wrote:
> With this patch, include public headers in "" form is only allowed
> for "internal.h". And only the external tools (examples|tools|python
> |include/libvirt) can include the public headers in <> form.
> ---
>  cfg.mk                         | 17 ++++++++++++++---
>  include/libvirt/libvirt-lxc.h  |  2 +-
>  include/libvirt/libvirt-qemu.h |  2 +-
>  python/libvirt-lxc-override.c  |  4 ++--
>  python/libvirt-override.c      |  4 ++--
>  python/libvirt-qemu-override.c |  4 ++--
>  python/typewrappers.h          |  4 ++--
>  tests/shunloadhelper.c         |  5 ++---
>  tools/virsh.c                  |  4 ++--
>  9 files changed, 28 insertions(+), 18 deletions(-)
> 
> diff --git a/cfg.mk b/cfg.mk
> index 5f422de..4128ebb 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -747,12 +747,20 @@ sc_prohibit_duplicate_header:
>  	fi;
>  
>  # Don't include "libvirt/*.h" in "" form.
> -sc_prohibit_include_public_headers:
> +sc_prohibit_include_public_headers_quote:
>  	@prohibit='# *include *"libvirt/.*\.h"'				\
>  	in_vc_files='\.[chx]$$'						\
>  	halt='Do not include libvirt/*.h in internal source'		\
>  	  $(_sc_search_regexp)
>  
> +# Don't include "libvirt/*.h" in <> form. Except for external tools,
> +# e.g. Python binding, examples and tools subdirectories.
> +sc_prohibit_include_public_headers_brackets:
> +	@prohibit='# *include *<libvirt/.*\.h>'				\
> +	in_vc_files='\.[chx]$$'						\

Change this to [ch] (we found out this morning that [chx] is too strict,
if 'dwarves' is installed).

ACK with that tweak.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]