summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/angband.h9
-rw-r--r--src/z-form.h7
-rw-r--r--src/z-rand.h7
-rw-r--r--src/z-term.h7
-rw-r--r--src/z-util.h7
-rw-r--r--src/z-virt.h7
6 files changed, 44 insertions, 0 deletions
diff --git a/src/angband.h b/src/angband.h
index 0496a302..cac38122 100644
--- a/src/angband.h
+++ b/src/angband.h
@@ -14,6 +14,12 @@
*/
+/*
+ * C++ guard.
+ */
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* First, include the low-level includes. Be sure to edit "h-config.h"
@@ -94,6 +100,9 @@
* of the author Robert Alan Koeneke.
*/
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
#endif
diff --git a/src/z-form.h b/src/z-form.h
index 69b46794..2dcfa96c 100644
--- a/src/z-form.h
+++ b/src/z-form.h
@@ -3,6 +3,10 @@
#ifndef INCLUDED_Z_FORM_H
#define INCLUDED_Z_FORM_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "h-basic.h"
/*
@@ -43,5 +47,8 @@ extern void quit_fmt(cptr fmt, ...);
/* Vararg interface to "core()", using "format()" */
extern void core_fmt(cptr fmt, ...);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
#endif
diff --git a/src/z-rand.h b/src/z-rand.h
index 69a531b4..6ff2dc64 100644
--- a/src/z-rand.h
+++ b/src/z-rand.h
@@ -3,6 +3,10 @@
#ifndef INCLUDED_Z_RAND_H
#define INCLUDED_Z_RAND_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "h-basic.h"
@@ -84,6 +88,9 @@ extern s32b damroll(s16b num, s16b sides);
extern s32b maxroll(s16b num, s16b sides);
+#ifdef __cplusplus
+} /* extern "C" */
#endif
+#endif
diff --git a/src/z-term.h b/src/z-term.h
index d7a34530..dae2e1bd 100644
--- a/src/z-term.h
+++ b/src/z-term.h
@@ -11,6 +11,10 @@
#ifndef INCLUDED_Z_TERM_H
#define INCLUDED_Z_TERM_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "h-basic.h"
#define IN_MAINWINDOW (Term == term_screen)
@@ -358,6 +362,9 @@ extern errr Term_activate(term *t);
extern errr term_nuke(term *t);
extern errr term_init(term *t, int w, int h, int k);
+#ifdef __cplusplus
+} /* extern "C" */
#endif
+#endif
diff --git a/src/z-util.h b/src/z-util.h
index 64871cf2..3fff283d 100644
--- a/src/z-util.h
+++ b/src/z-util.h
@@ -3,6 +3,10 @@
#ifndef INCLUDED_Z_UTIL_H
#define INCLUDED_Z_UTIL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "h-basic.h"
@@ -80,5 +84,8 @@ extern void core(cptr str);
+#ifdef __cplusplus
+} /* extern "C" */
#endif
+#endif
diff --git a/src/z-virt.h b/src/z-virt.h
index b45f3905..9b725be5 100644
--- a/src/z-virt.h
+++ b/src/z-virt.h
@@ -11,6 +11,10 @@
#ifndef INCLUDED_Z_VIRT_H
#define INCLUDED_Z_VIRT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "h-basic.h"
#ifdef CHECK_MEMORY_LEAKS
@@ -173,7 +177,10 @@ extern errr string_free(cptr str);
+#ifdef __cplusplus
+} /* extern "C" */
#endif
+#endif