[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] libxc, libxenstore: make the headers C++-friendly
>>> 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. > > /* If we copy from the end backwards, we should > * be able to do the modification in-place */ > - new->error_code=old->error_code; > - new->pending_event=old->pending_event; > - new->tsc=old->tsc; > - new->msr_tsc_aux=0; > + newcpu->error_code=old->error_code; > + newcpu->pending_event=old->pending_event; > + newcpu->tsc=old->tsc; > + newcpu->msr_tsc_aux=0; Here and above - if you already touch those, could you add spaces around the = operators? > --- 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. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |