From: Павел Крюков Date: Mon, 31 Dec 2018 11:53:54 +0000 (+0300) Subject: Add 'extern C' if simulator is written in C++ X-Git-Tag: binutils-2_32~186 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=444b3faef5397eee5a06fe0e683d2ac3e6628fdc;p=thirdparty%2Fbinutils-gdb.git 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/ChangeLog b/sim/ChangeLog index efd1f8837ec..7bee5f73e16 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,7 @@ +2019-01-03 Pavel I. Kryukov + + * sim-base.h: Add 'extern C' if header is compiled with C++. + 2018-12-06 Andrew Burgess * common/acinclude.m4 (enable-cgen-maint): Support passing path to diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h index 6d5fd45a01f..3123c07e2b2 100644 --- a/sim/common/sim-base.h +++ b/sim/common/sim-base.h @@ -55,6 +55,10 @@ along with this program. If not, see . */ #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 */