From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@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 11:54:00 -0000 Message-ID: Subject: [PATCH] Add 'extern C' if simulator is written in C++ To: gdb-patches@sourceware.org Cc: vapier@gentoo.org Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-12/txt/msg00447.txt.bz2 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++ 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 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 */