From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH] libxc, libxenstore: make the headers C++-friendly Date: Tue, 22 Jan 2013 19:34:18 +0200 Message-ID: <50FECD9A.3080308@gmail.com> References: <93e5f6cf98d2ae3539db.1358873051@rcojocaru.dsd.ro> <20130122165724.GD87324@ocelot.phlegethon.org> <50FEC86F.4020308@gmail.com> <20130122172801.GE87324@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130122172801.GE87324@ocelot.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 Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >> However, most well-behaved C libraries do that for all their headers. > > xen/include/public is is not a library, it's the C API (and ABI) of the > hypervisor. By all means make libxc/libxg/libxl C++-friendly if you > like, but please leave the hypervisor interface alone. I understand your position, however I should point out that, if done properly, making even all the headers in Xen C++-friendly would have no impact whatsoever on anything in Xen. If you compile them with a C compiler (i.e. gcc instead of g++), the 'extern "C"' statements simply don't exist (because then __cplusplus is not #defined). As for the rest, all that's required is to not use C++ keywords as variable names, and to be careful to define something before typedef-ing it. That's absolutely all there is to it. Thank you for your time and comments, Razvan Cojocaru