From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH] xen: Minor modifications to platform.h to make it C++-friendly Date: Mon, 23 Feb 2015 13:24:29 +0200 Message-ID: <54EB0DED.1000201@bitdefender.com> References: <1424684065-5971-1-git-send-email-rcojocaru@bitdefender.com> <54EB0C0F0200007800062651@mail.emea.novell.com> <54EB017E.5000509@bitdefender.com> <54EB14D902000078000626B5@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54EB14D902000078000626B5@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: tim@xen.org, xen-devel@lists.xen.org, keir@xen.org, ian.jackson@eu.citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.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 #define private rprivate /* private is a C++ keyword */ #include #undef private } I've understood Tim's message about "extern "C"" so I've fixed it at #include-time in my code. :) HTH, Razvan