From patchwork Mon Dec 31 11:53:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?0J/QsNCy0LXQuyDQmtGA0Y7QutC+0LI=?= X-Patchwork-Id: 30909 Received: (qmail 125502 invoked by alias); 31 Dec 2018 11:54:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 125486 invoked by uid 89); 31 Dec 2018 11:54:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, FROM_EXCESS_BASE64, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=simulator, H*Ad:D*gentoo.org, Hx-languages-length:1673, typedef X-HELO: mail-it1-f176.google.com Received: from mail-it1-f176.google.com (HELO mail-it1-f176.google.com) (209.85.166.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 31 Dec 2018 11:54:06 +0000 Received: by mail-it1-f176.google.com with SMTP id c9so33748389itj.1 for ; Mon, 31 Dec 2018 03:54:05 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?B?0J/QsNCy0LXQuyDQmtGA0Y7QutC+0LI=?= Date: Mon, 31 Dec 2018 14:53:54 +0300 Message-ID: Subject: [PATCH] Add 'extern C' if simulator is written in C++ To: gdb-patches@sourceware.org Cc: vapier@gentoo.org Add 'extern C' if simulator is written in C++ sim/common/Changelog: 2018-12-31 Pavel I. Kryukov * sim-base.h: Add 'extern C' if header is compiled with C++ /* typedef 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 */ 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. */