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

Re: [Xen-devel] [PATCH] xen: Minor modifications to platform.h to make it C++-friendly


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Mon, 23 Feb 2015 13:24:29 +0200
  • Cc: tim@xxxxxxx, xen-devel@xxxxxxxxxxxxx, keir@xxxxxxx, ian.jackson@xxxxxxxxxxxxx, ian.campbell@xxxxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Mon, 23 Feb 2015 11:25:22 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=0nOn7y8rUdRkNMiRzsmZbWU5HpD+vhs+z6spx6xALVrd6BPnTovfXqZTAfV+JRxZjzgb8Wmnzb2rTeybEL6K4YEafDDFvt1ueds8Gp6ljF/u+wPJIrad6O3gc4vPIGTLvxO3WnQpt8v62AQ5NXCvwDiBuJEe54/A7YoBcJCY/HAruR6ltDnhWAcu0j0OagFDNuTI7d281oKZDn61O4xR6VofrnywdWSXiJCdIn5bq09/HlD065DdDe8R7fPBQ94CBzmo/5YHo/womksFTJV+DEevs8bsLvZP42KLKqJfZRJIM+nyVuhQ1KHFTAEWcHeaEONaRgM4FXL6RrFqJRrauw==; h=Received:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 02/23/2015 12:54 PM, Jan Beulich wrote:
> I'm not convinced we need the headers to be C++ ready (nor am
> I convinced that there aren't any other obstacles preventing their
> unmodified use in C++).

Sorry, I meant to answer the last part too. I'm using libxc and xenstore
headers, as well as the public Xen headers with C++, and so far the only
trouble I've had was what this patch is addressing, and there's
something called "private" (a macro or a variable, I don't remember
exactly) which is a keyword in C++. I've done the following to work
around that:

extern "C" {
#include <xenstore.h>
#define private rprivate /* private is a C++ keyword */
#include <xen/mem_event.h>
#undef private
}

I've understood Tim's message about "extern "C"" so I've fixed it at
#include-time in my code. :)


HTH,
Razvan

_______________________________________________
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®.