All of lore.kernel.org
 help / color / mirror / Atom feed
* conflict in public header for values definitions
@ 2014-01-03 18:38 Igor Kozhukhov
  2014-01-03 18:43 ` Andrew Cooper
  2014-01-06 10:18 ` Ian Campbell
  0 siblings, 2 replies; 5+ messages in thread
From: Igor Kozhukhov @ 2014-01-03 18:38 UTC (permalink / raw)
  To: xen-devel

Hello All,

I'm working on port xen-4.2 to illumos based platform - DilOS - and have problems with conflicts for:

xen/include/public/trace.h :

struct t_buf {}
struct t_info {}

I have a questions - can we rename structures to:
struct t_buf_xen {}
struct t_info_xen {}

Will it be applicable for Xen sources ?
if yes - i can update Xen sources by new variables and provide changes to review.

it will help with next Xen ports without changes in public headers.

--
Best regards,
Igor Kozhukhov

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: conflict in public header for values definitions
  2014-01-03 18:38 conflict in public header for values definitions Igor Kozhukhov
@ 2014-01-03 18:43 ` Andrew Cooper
  2014-01-03 19:49   ` Igor Kozhukhov
  2014-01-06 10:18 ` Ian Campbell
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2014-01-03 18:43 UTC (permalink / raw)
  To: Igor Kozhukhov; +Cc: xen-devel

On 03/01/14 18:38, Igor Kozhukhov wrote:
> Hello All,
>
> I'm working on port xen-4.2 to illumos based platform - DilOS - and have problems with conflicts for:
>
> xen/include/public/trace.h :
>
> struct t_buf {}
> struct t_info {}
>
> I have a questions - can we rename structures to:
> struct t_buf_xen {}
> struct t_info_xen {}
>
> Will it be applicable for Xen sources ?

You would break the compilation for every other user of trace.h, so no.

If it conflicts with something locally, you could do something like:
(completely untested)

#define t_buf t_buf_xen
#include <public/trace.h>
#undef t_buf

And use t_buf_xen in your own code.

~Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: conflict in public header for values definitions
  2014-01-03 18:43 ` Andrew Cooper
@ 2014-01-03 19:49   ` Igor Kozhukhov
  2014-01-07 12:40     ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Igor Kozhukhov @ 2014-01-03 19:49 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: xen-devel

Hi Andrew,

it is impossible to do outside public headers, because we have trace.h included to another public readers - for example: xen/public/hvm/hvm_op.h

will be better to have committed changes in public headers for next ports without additional changes in sources.

is it possible to add '#ifdef __sun' to public headers ?
I can try to do it and provide review ?
or i need update public headers in illumos tree every time ?

--
Best regards,
Igor Kozhukhov




On Jan 3, 2014, at 10:43 PM, Andrew Cooper wrote:

> On 03/01/14 18:38, Igor Kozhukhov wrote:
>> Hello All,
>> 
>> I'm working on port xen-4.2 to illumos based platform - DilOS - and have problems with conflicts for:
>> 
>> xen/include/public/trace.h :
>> 
>> struct t_buf {}
>> struct t_info {}
>> 
>> I have a questions - can we rename structures to:
>> struct t_buf_xen {}
>> struct t_info_xen {}
>> 
>> Will it be applicable for Xen sources ?
> 
> You would break the compilation for every other user of trace.h, so no.
> 
> If it conflicts with something locally, you could do something like:
> (completely untested)
> 
> #define t_buf t_buf_xen
> #include <public/trace.h>
> #undef t_buf
> 
> And use t_buf_xen in your own code.
> 
> ~Andrew
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: conflict in public header for values definitions
  2014-01-03 18:38 conflict in public header for values definitions Igor Kozhukhov
  2014-01-03 18:43 ` Andrew Cooper
@ 2014-01-06 10:18 ` Ian Campbell
  1 sibling, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-01-06 10:18 UTC (permalink / raw)
  To: Igor Kozhukhov; +Cc: xen-devel

On Fri, 2014-01-03 at 22:38 +0400, Igor Kozhukhov wrote:
> Hello All,
> 
> I'm working on port xen-4.2 to illumos based platform - DilOS - and have problems with conflicts for:
> 
> xen/include/public/trace.h :
> 
> struct t_buf {}
> struct t_info {}

What do these conflict with? Is it user or kernel space? Please can you
provide the full build error for context.

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: conflict in public header for values definitions
  2014-01-03 19:49   ` Igor Kozhukhov
@ 2014-01-07 12:40     ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2014-01-07 12:40 UTC (permalink / raw)
  To: Igor Kozhukhov; +Cc: Andrew Cooper, xen-devel

>>> On 03.01.14 at 20:49, Igor Kozhukhov <ikozhukhov@gmail.com> wrote:
> it is impossible to do outside public headers, because we have trace.h 
> included to another public readers - for example: xen/public/hvm/hvm_op.h

Just create suitable wrapper headers for any such instance.

> will be better to have committed changes in public headers for next ports 
> without additional changes in sources.
> 
> is it possible to add '#ifdef __sun' to public headers ?

Not if there's a better way. Yes, I agree that the lack of xen_
prefixes in various places is unfortunate, but I don't see why
you shouldn't be able to cope if everyone else can.

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-07 12:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-03 18:38 conflict in public header for values definitions Igor Kozhukhov
2014-01-03 18:43 ` Andrew Cooper
2014-01-03 19:49   ` Igor Kozhukhov
2014-01-07 12:40     ` Jan Beulich
2014-01-06 10:18 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.