aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-03-09 17:24:03 -0800
committerChris Robinson <[email protected]>2018-03-09 17:24:03 -0800
commit30821e978b69fa017cbcd76e5ff25c62f16b1d2a (patch)
tree6c47c2d5f96d95c46de636a79cbb2e21fb39308f /Alc
parentc0e7a5b8b07132f39e7bf60371586d5d56984e14 (diff)
Add extern "C" to some headers
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alstring.h8
-rw-r--r--Alc/backends/base.h8
-rw-r--r--Alc/compat.h8
-rw-r--r--Alc/logging.h8
-rw-r--r--Alc/ringbuffer.h8
5 files changed, 40 insertions, 0 deletions
diff --git a/Alc/alstring.h b/Alc/alstring.h
index e10811da..923a5ea2 100644
--- a/Alc/alstring.h
+++ b/Alc/alstring.h
@@ -6,6 +6,10 @@
#include "vector.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef char al_string_char_type;
TYPEDEF_VECTOR(al_string_char_type, al_string)
TYPEDEF_VECTOR(al_string, vector_al_string)
@@ -47,4 +51,8 @@ void alstr_copy_wrange(al_string *str, const wchar_t *from, const wchar_t *to);
void alstr_append_wrange(al_string *str, const wchar_t *from, const wchar_t *to);
#endif
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* ALSTRING_H */
diff --git a/Alc/backends/base.h b/Alc/backends/base.h
index b05523b2..6940a2a2 100644
--- a/Alc/backends/base.h
+++ b/Alc/backends/base.h
@@ -5,6 +5,10 @@
#include "threads.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct ClockLatency {
ALint64 ClockTime;
ALint64 Latency;
@@ -157,4 +161,8 @@ inline void ALCdevice_Lock(ALCdevice *device)
inline void ALCdevice_Unlock(ALCdevice *device)
{ V0(device->Backend,unlock)(); }
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* AL_BACKENDS_BASE_H */
diff --git a/Alc/compat.h b/Alc/compat.h
index 6cf2d0d2..093184c8 100644
--- a/Alc/compat.h
+++ b/Alc/compat.h
@@ -3,6 +3,10 @@
#include "alstring.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
@@ -54,4 +58,8 @@ void *GetSymbol(void *handle, const char *name);
void *Android_GetJNIEnv(void);
#endif
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* AL_COMPAT_H */
diff --git a/Alc/logging.h b/Alc/logging.h
index 18093b75..785771c8 100644
--- a/Alc/logging.h
+++ b/Alc/logging.h
@@ -10,6 +10,10 @@
#define DECL_FORMAT(x, y, z)
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern FILE *LogFile;
#if defined(__GNUC__) && !defined(_WIN32)
@@ -58,4 +62,8 @@ extern enum LogLevel LogLevel;
LOG_ANDROID(ANDROID_LOG_ERROR, __VA_ARGS__); \
} while(0)
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* LOGGING_H */
diff --git a/Alc/ringbuffer.h b/Alc/ringbuffer.h
index bcf67374..0d05ec84 100644
--- a/Alc/ringbuffer.h
+++ b/Alc/ringbuffer.h
@@ -4,6 +4,10 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct ll_ringbuffer ll_ringbuffer_t;
typedef struct ll_ringbuffer_data {
char *buf;
@@ -66,4 +70,8 @@ size_t ll_ringbuffer_write(ll_ringbuffer_t *rb, const char *src, size_t cnt);
/** Advance the write pointer `cnt' places. */
void ll_ringbuffer_write_advance(ll_ringbuffer_t *rb, size_t cnt);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* RINGBUFFER_H */