On Wed, Mar 21, 2018 at 05:22:07PM +0200, Michael S. Tsirkin wrote: > Our rule right now is to use <> for external headers, > "" for internal ones. The idea was to avoid conflicts > between e.g. a system file named <trace.h> and an > internal one by the same name. > > Unfortunately we use -I compiler flag so it does not > help: a system file doing #include <trace.h> will > still pick up ours first. > > To fix, switch to -iquote which is supported by both > gcc and clang and only affects #include "" directives. > > As a side effect, this catches any future uses of > #include <> for internal headers. > > Suggested-by: Stefan Weil <s...@weilnetz.de> > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> > --- > > I still think we want to switch to a more formal rule such as qemu/ > prefix for all includes down the road, but this will at least catch any > scheme violations from creeping in meanwhile. > > > configure | 16 ++++++++-------- > rules.mak | 2 +- > Makefile.target | 4 ++-- > 3 files changed, 11 insertions(+), 11 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature