All of lore.kernel.org
 help / color / mirror / Atom feed
* reserved words in tmem.h
@ 2010-12-10  0:33 James Harper
  2010-12-10  7:18 ` Keir Fraser
  2010-12-10 11:17 ` Keir Fraser
  0 siblings, 2 replies; 5+ messages in thread
From: James Harper @ 2010-12-10  0:33 UTC (permalink / raw)
  To: xen-devel

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

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

* Re: reserved words in tmem.h
  2010-12-10  0:33 reserved words in tmem.h James Harper
@ 2010-12-10  7:18 ` Keir Fraser
  2010-12-10 11:17 ` Keir Fraser
  1 sibling, 0 replies; 5+ messages in thread
From: Keir Fraser @ 2010-12-10  7:18 UTC (permalink / raw)
  To: James Harper, 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

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

* Re: reserved words in tmem.h
  2010-12-10  0:33 reserved words in tmem.h James Harper
  2010-12-10  7:18 ` Keir Fraser
@ 2010-12-10 11:17 ` Keir Fraser
  2010-12-10 20:10   ` Dan Magenheimer
  1 sibling, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2010-12-10 11:17 UTC (permalink / raw)
  To: James Harper, 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

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

* RE: reserved words in tmem.h
  2010-12-10 11:17 ` Keir Fraser
@ 2010-12-10 20:10   ` Dan Magenheimer
  2010-12-10 20:21     ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Magenheimer @ 2010-12-10 20:10 UTC (permalink / raw)
  To: Keir Fraser, James Harper, 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

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

* RE: reserved words in tmem.h
  2010-12-10 20:10   ` Dan Magenheimer
@ 2010-12-10 20:21     ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2010-12-10 20:21 UTC (permalink / raw)
  To: Dan Magenheimer; +Cc: James Harper, Keir Fraser, 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.

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

end of thread, other threads:[~2010-12-10 20:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10  0:33 reserved words in tmem.h James Harper
2010-12-10  7:18 ` Keir Fraser
2010-12-10 11:17 ` Keir Fraser
2010-12-10 20:10   ` Dan Magenheimer
2010-12-10 20:21     ` 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.