discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Guy Harris <guy@alum.mit.edu>
To: discuss@mdocml.bsd.lv
Subject: Re: mdocml [CVS_2015_11_07] C++ Declaration Guards
Date: Fri, 6 Nov 2015 19:37:56 -0800	[thread overview]
Message-ID: <76A4D614-06C6-4ACE-81A5-F02927D7921E@alum.mit.edu> (raw)
In-Reply-To: <563D700F.9090001@yahoo.com.au>


On Nov 6, 2015, at 7:29 PM, Peter Bray <pdb_ml@yahoo.com.au> wrote:

> I'll leave it to the developers and maintainers to choose the
> appropriate solution for their code base.

Replace __BEGIN_DECLS with

	#ifdef __cplusplus
	extern "C" {
	#endif

and replace __END_DECLS with

	#ifdef __cplusplus
	}
	#endif

?  Perhaps a bit uglier, but more easily portable, and it makes it a bit more obvious what's actually being done.

(That's the solution used by two code bases I work on - libpcap and Wireshark.)--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2015-11-07  3:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07  3:29 Peter Bray
2015-11-07  3:37 ` Guy Harris [this message]
2015-11-07 14:06 ` Ingo Schwarze
2015-11-07 14:25   ` Joerg Sonnenberger
2015-11-07 14:34     ` Ingo Schwarze
2015-11-07 14:37       ` Joerg Sonnenberger
2015-11-11 10:57     ` Steffen Nurpmeso

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=76A4D614-06C6-4ACE-81A5-F02927D7921E@alum.mit.edu \
    --to=guy@alum.mit.edu \
    --cc=discuss@mdocml.bsd.lv \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).