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

Re: [Xen-devel] [PATCH] libxc, libxenstore: make the headers C++-friendly



On Tue, 2013-01-22 at 16:53 +0000, Jan Beulich wrote:
> >>> On 22.01.13 at 17:44, Razvan Cojocaru <rzvncj@xxxxxxxxx> wrote:
> > --- a/xen/include/public/arch-x86/hvm/save.h        Mon Jan 21 17:03:10 
> > 2013 +0000
> > +++ b/xen/include/public/arch-x86/hvm/save.h        Tue Jan 22 18:43:45 
> > 2013 +0200
> > @@ -269,15 +269,15 @@ struct hvm_hw_cpu_compat {
> >  };
> >  
> >  static inline int _hvm_hw_fix_cpu(void *h) {
> > -    struct hvm_hw_cpu *new=h;
> > -    struct hvm_hw_cpu_compat *old=h;
> > +    struct hvm_hw_cpu *newcpu=(struct hvm_hw_cpu *)h;
> > +    struct hvm_hw_cpu_compat *old=(struct hvm_hw_cpu_compat *)h;
> 
> That's not really C++. But yes, I recognize that the alternative
> would be an even uglier #ifdef.

Or out of lining this entire sucker?

> > --- a/xen/include/public/io/ring.h  Mon Jan 21 17:03:10 2013 +0000
> > +++ b/xen/include/public/io/ring.h  Tue Jan 22 18:43:45 2013 +0200
> > @@ -111,7 +111,7 @@ struct __name##_sring {                 
> >              uint8_t msg;                                                \
> >          } tapif_user;                                                   \
> >          uint8_t pvt_pad[4];                                             \
> > -    } private;                                                          \
> > +    } rprivate;                                                          \
> 
> This is a no-go: In a public header, you can't change names like
> this. Since the stuff under io/ isn't really tied to
> __XEN_INTERFACE_VERSION__, I'm also not immediately seeing
> how else you could adjust this.

Me neither. Perhaps everyone uses the macros and we get away with this
change?

Was this change build tested, including stubdoms and other tools which
may rely on these headers? (qemu?)

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.