On 06/01/2015 12:59 AM, Paolo Bonzini wrote:
> 
> 
> On 31/05/2015 08:11, Peter Crosthwaite wrote:
>> Allow subsequent inclusion of cpu-defs.h. This allows including
>> multiple cpu.h's and each getting the right set of definitions for
>> its env structure definition. All define symbols are undeffed and
>> redeffed to the new values.
>>
>> CPUTLBEntry and CPUIOTLBEntry need to be renamed via #define by
>> the caller to avoid namespace collisions.
> 
> Please document these things (#undeffing of preprocessor symbols and
> what needs to be renamed) in the header.
> 
> Also the same is true for include/exec/target-long.h---where
> additionally I am not sure about how you'd deal with a redefined
> typedef.  Some compilers flag it as an error even if the source type is
> the same.

Whee, I'm not alone in my curiosity.

Of course, one way around this is to make target_[u]long be defines instead of
typedefs.  Whether that's a sufficient solution, I have no idea.

That said, I think I'm also missing the point of multiple-inclusion.  Perhaps
it'll become clearer in a patch I haven't seen yet.


r~

Reply via email to