qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular


From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
Date: Thu, 12 Jan 2017 01:59:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Daniel P Berrange writes:

> On Wed, Jan 11, 2017 at 06:34:40PM +0100, Paolo Bonzini wrote:
[...]
>> > and we can't
>> > use relative includes for that, since the relative include gets
>> > resolved wrt the source file doing the #include, but the trace.h
>> > file is in $BUILD_DIR.
>> 
>> Why would #include "../foo/trace.h" be resolved against the source
>> file's path only, and not against all -I directories?

> If we have a plain "../trace.h", then it can end up hitting the
> wrong file, because there are many -I dirs listed and most of
> them contain a trace.h file, so if it matches on the 2nd -I
> dir and you need the one from the 3rd -I dir it gets "fun".

> Having all the trace.h files included with path from the root
> is alot simpler to understand IMHO than just plain "trace.h"
> and hoping the -I order is going to ensure the right one is
> found

I'm with Daniel and and Eric on this one, for whatever it matters. It's clearer
to *me* to have includes starting on the project's root.


Cheers,
  Lluis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]