aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorПавел Крюков <kryukov@frtk.ru>2018-12-31 14:53:54 +0300
committerSimon Marchi <simon.marchi@polymtl.ca>2019-01-03 09:41:13 -0500
commit444b3faef5397eee5a06fe0e683d2ac3e6628fdc (patch)
treea917c284c6aa9a920322f385d580c9d2bd2a45ec /sim/common
parent69961a84c9b3744a10248fb6cbccc3c688a1e0a5 (diff)
downloadgdb-444b3faef5397eee5a06fe0e683d2ac3e6628fdc.zip
gdb-444b3faef5397eee5a06fe0e683d2ac3e6628fdc.tar.gz
gdb-444b3faef5397eee5a06fe0e683d2ac3e6628fdc.tar.bz2
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++
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/sim-base.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 6d5fd45..3123c07 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 */