Like libvirt.h, these two public headers also shouldn't be included
in internal source, except "internal.h". A later patch will force
tools to use <> form.
---
cfg.mk | 20 ++++++++++++++++++++
daemon/remote.c | 2 --
src/libvirt-qemu.c | 1 -
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 98c7e40..4b84bde 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -758,6 +758,20 @@ sc_prohibit_include_virterror_h:
halt='Do not include libvirt/virterror.h in internal source' \
$(_sc_search_regexp)
+# Don't include "libvirt/libvirt-qemu.h" in "" form.
+sc_prohibit_include_libvirt_qemu_h:
+ @prohibit='^# *include *"libvirt/libvirt-qemu\.h"' \
+ in_vc_files='\.[ch]$$' \
+ halt='Do not include libvirt/libvirt-qemu.h in internal source' \
+ $(_sc_search_regexp)
+
+# Don't include "libvirt/libvirt-lxc.h" in "" form.
+sc_prohibit_include_libvirt_lxc_h:
+ @prohibit='^# *include *"libvirt/libvirt-lxc\.h"' \
+ in_vc_files='\.[ch]$$' \
+ halt='Do not include libvirt/libvirt-lxc.h in internal source' \
+ $(_sc_search_regexp)
+
# Don't include "libvirt/libvirt.h" in <> form. Except external
tools, e.g.
# python binding, examples and tools subdirectories.
sc_prohibit_include_libvirt_h_1:
@@ -939,3 +953,9 @@ exclude_file_name_regexp--sc_prohibit_include_libvirt_h_1 = \
exclude_file_name_regexp--sc_prohibit_include_virterror_h_1 = \
^(examples/|tools/|python/|include/libvirt/)
+
+exclude_file_name_regexp--sc_prohibit_include_libvirt_qemu_h = \
+ ^(src/internal\.h$$|tools/)
+
+exclude_file_name_regexp--sc_prohibit_include_libvirt_lxc_h = \
+ ^(src/internal\.h$$|tools/)
diff --git a/daemon/remote.c b/daemon/remote.c
index 45c50f3..c559d6f 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -38,8 +38,6 @@
#include "virutil.h"
#include "stream.h"
#include "viruuid.h"
-#include "libvirt/libvirt-qemu.h"
-#include "libvirt/libvirt-lxc.h"
#include "vircommand.h"
#include "intprops.h"
#include "virnetserverservice.h"
diff --git a/src/libvirt-qemu.c b/src/libvirt-qemu.c
index 11da2f3..fb19584 100644
--- a/src/libvirt-qemu.c
+++ b/src/libvirt-qemu.c
@@ -26,7 +26,6 @@
#include "virerror.h"
#include "virlog.h"
#include "datatypes.h"
-#include "libvirt/libvirt-qemu.h"
#define VIR_FROM_THIS VIR_FROM_NONE
--
1.8.1.4