From: Razvan Cojocaru <rzvncj@gmail.com>
To: Tim Deegan <tim@xen.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] libxc, libxenstore: make the headers C++-friendly
Date: Tue, 22 Jan 2013 19:34:18 +0200 [thread overview]
Message-ID: <50FECD9A.3080308@gmail.com> (raw)
In-Reply-To: <20130122172801.GE87324@ocelot.phlegethon.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
prev parent reply other threads:[~2013-01-22 17:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 16:44 [PATCH] libxc, libxenstore: make the headers C++-friendly Razvan Cojocaru
2013-01-22 16:53 ` Jan Beulich
2013-01-22 17:02 ` Ian Campbell
2013-01-22 17:18 ` Razvan Cojocaru
2013-01-22 17:19 ` Jan Beulich
2013-01-22 17:07 ` Razvan Cojocaru
2013-01-22 17:12 ` Jan Beulich
2013-01-22 17:21 ` Razvan Cojocaru
2013-01-22 17:24 ` Ian Campbell
2013-01-22 17:29 ` Razvan Cojocaru
2013-01-22 17:30 ` Andrew Cooper
2013-01-22 17:26 ` Jan Beulich
2013-01-22 17:26 ` Razvan Cojocaru
2013-01-22 17:31 ` Tim Deegan
2013-01-22 17:44 ` Razvan Cojocaru
2013-01-23 8:25 ` Jan Beulich
2013-01-22 16:57 ` Tim Deegan
2013-01-22 17:12 ` Razvan Cojocaru
2013-01-22 17:28 ` Tim Deegan
2013-01-22 17:34 ` Razvan Cojocaru [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50FECD9A.3080308@gmail.com \
--to=rzvncj@gmail.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.