Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Павел Крюков" <kryukov@frtk.ru>
To: gdb-patches@sourceware.org
Cc: vapier@gentoo.org
Subject: [PATCH] Add 'extern C' if simulator is written in C++
Date: Mon, 31 Dec 2018 11:54:00 -0000	[thread overview]
Message-ID: <CADip9gb6jrepCr=uN3iu4MKF93BwF=KLzr6M340arn9A9Fa3_w@mail.gmail.com> (raw)

Add 'extern C' if simulator is written in C++

sim/common/Changelog:
2018-12-31  Pavel I. Kryukov  <kryukov@frtk.ru>

        * sim-base.h: Add 'extern C' if header is compiled with C++

diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 524195e8ad..e5f295458d 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -55,6 +55,10 @@ along with this program.  If not, see <
http://www.gnu.org/licenses/>.  */
 #ifndef SIM_BASE_H
 #define SIM_BASE_H

+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Pre-declare certain types. */

 /* typedef <target-dependant> sim_cia; */
@@ -224,4 +228,8 @@ typedef struct {
 SIM_DESC sim_state_alloc (SIM_OPEN_KIND kind, host_callback *callback);
 void sim_state_free (SIM_DESC);

+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SIM_BASE_H */


             reply	other threads:[~2018-12-31 11:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-31 11:54 Павел Крюков [this message]
2019-01-03  3:31 ` Simon Marchi
2019-01-03  5:39   ` Павел Крюков
2019-01-03 14:47     ` Simon Marchi

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='CADip9gb6jrepCr=uN3iu4MKF93BwF=KLzr6M340arn9A9Fa3_w@mail.gmail.com' \
    --to=kryukov@frtk.ru \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.org \
    /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