xen/include/public/tmem.h uses ''new'' as the name of a structure, which is a reserved word under C++. tmem.h is included by xenctrl.h, which prevents anyone writing a C++ userspace app using gntdev and friends without rolling their own modifications to include files. new is a reserved word under C++ but not C (C99 at least), but I still think it''s bad form to use it in an include file that could legitimately be used by a C++ application. Does anyone else see this as a problem? Thanks James _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Oh yes, we''ll have to change the name. -- Keir On 10/12/2010 00:33, "James Harper" <james.harper@bendigoit.com.au> wrote:> xen/include/public/tmem.h uses ''new'' as the name of a structure, which > is a reserved word under C++. tmem.h is included by xenctrl.h, which > prevents anyone writing a C++ userspace app using gntdev and friends > without rolling their own modifications to include files. > > new is a reserved word under C++ but not C (C99 at least), but I still > think it''s bad form to use it in an include file that could legitimately > be used by a C++ application. > > Does anyone else see this as a problem? > > Thanks > > James > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I fixed this in xen-unstable and I will backport to xen-4.0. -- Keir On 10/12/2010 00:33, "James Harper" <james.harper@bendigoit.com.au> wrote:> xen/include/public/tmem.h uses ''new'' as the name of a structure, which > is a reserved word under C++. tmem.h is included by xenctrl.h, which > prevents anyone writing a C++ userspace app using gntdev and friends > without rolling their own modifications to include files. > > new is a reserved word under C++ but not C (C99 at least), but I still > think it''s bad form to use it in an include file that could legitimately > be used by a C++ application. > > Does anyone else see this as a problem? > > Thanks > > James > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I certainly don''t object and the name Keir chose is fine but, since this is currently a guest-kernel-only interface definition, I''d be VERY interested to hear who might be using it in C++. Is there a guest OS written in C++? Or is someone trying to use tmem from user-land? Or...??> -----Original Message----- > From: Keir Fraser [mailto:keir@xen.org] > Sent: Friday, December 10, 2010 4:18 AM > To: James Harper; xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] reserved words in tmem.h > > I fixed this in xen-unstable and I will backport to xen-4.0. > > -- Keir > > > On 10/12/2010 00:33, "James Harper" <james.harper@bendigoit.com.au> > wrote: > > > xen/include/public/tmem.h uses ''new'' as the name of a structure, > which > > is a reserved word under C++. tmem.h is included by xenctrl.h, which > > prevents anyone writing a C++ userspace app using gntdev and friends > > without rolling their own modifications to include files. > > > > new is a reserved word under C++ but not C (C99 at least), but I > still > > think it''s bad form to use it in an include file that could > legitimately > > be used by a C++ application. > > > > Does anyone else see this as a problem? > > > > Thanks > > > > James > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, 2010-12-10 at 20:10 +0000, Dan Magenheimer wrote:> I certainly don''t object and the name Keir chose is fine but, > since this is currently a guest-kernel-only interface definition, > I''d be VERY interested to hear who might be using it in C++. > Is there a guest OS written in C++? Or is someone trying to > use tmem from user-land? Or...??xenctrl.h includes tmem.h so this issue prevents the use of the entire libxencontrol library not just tmem. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel