From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH v2] RFC: Automatically check xen's public headers for C++ pitfalls. Date: Thu, 26 Feb 2015 15:31:06 -0500 Message-ID: <54EF828A.9080201@terremark.com> References: <1424956264-15271-1-git-send-email-tim@xen.org> <1424967096-6105-1-git-send-email-tim@xen.org> <20150226162842.GG43832@deinos.phlegethon.org> <54EF5C3302000078000643ED@mail.emea.novell.com> <20150226170154.GB43834@deinos.phlegethon.org> <54EF5CA2.8050807@bitdefender.com> <20150226192203.GA80992@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150226192203.GA80992@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan , Razvan Cojocaru Cc: Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 02/26/15 14:22, Tim Deegan wrote: > At 19:49 +0200 on 26 Feb (1424976562), Razvan Cojocaru wrote: >> On 02/26/2015 07:01 PM, Tim Deegan wrote: >>> +#ifdef __cplusplus >>> +/* 'private' is a keyword in C++, so we have to use a different name for >>> + * private state there. Leaving the C name alone to avoid unnecessary >>> + * pain for the existing users. */ >>> +#define XEN_RING_PRIVATE pvt >>> +#else >>> +#define XEN_RING_PRIVATE private >>> +#endif >> >> Are there likely to be many users outside of the ones using that code >> with mem_event? > > Yes, lots. It's used to implement split drivers for net, block, etc. > Most users will have taken copies of this header into their own trees, > though, and so won't face build breakage, and this isn't an ABI change. > > So far, I've seen David and Andrew in favour of just changing the > field's name and letting out-of-tree users update their copies when/if > they want to. Jan would prefer to avoid changing the field name for C > users. I'm not delighted with any of these options but I think this > ifdeffery is worse than the others. :) > > Let's see what anyone else has to say. > Since I am one of the user of C++ and Xen headers, I like this a lot. I do not like the ifdeffery above. I am in favour of just changing the the field's name. -Don Slutz > Cheers, > > Tim. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >