Add extern "C" to common headers.

This commit is contained in:
Chris Robinson
2014-05-29 04:22:30 -07:00
parent 73614f228e
commit 1d45c439b8
4 changed files with 30 additions and 0 deletions
+7
View File
@@ -3,6 +3,9 @@
#include "static_assert.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef void *volatile XchgPtr;
@@ -198,4 +201,8 @@ inline void *CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval)
#error "No atomic functions available on this platform!"
#endif
#ifdef __cplusplus
}
#endif
#endif /* AL_ATOMIC_H */
+8
View File
@@ -4,6 +4,10 @@
#include "bool.h"
#include "atomic.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
RefCount read_count;
RefCount write_count;
@@ -19,4 +23,8 @@ void ReadUnlock(RWLock *lock);
void WriteLock(RWLock *lock);
void WriteUnlock(RWLock *lock);
#ifdef __cplusplus
}
#endif
#endif /* AL_RWLOCK_H */
+7
View File
@@ -3,6 +3,9 @@
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
enum {
althrd_success = 0,
@@ -227,4 +230,8 @@ int altimespec_get(struct timespec *ts, int base);
void al_nssleep(time_t sec, long nsec);
#ifdef __cplusplus
}
#endif
#endif /* AL_THREADS_H */
+8
View File
@@ -4,6 +4,10 @@
#include "AL/al.h"
#include "rwlock.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct UIntMap {
struct {
ALuint key;
@@ -32,4 +36,8 @@ inline void LockUIntMapWrite(UIntMap *map)
inline void UnlockUIntMapWrite(UIntMap *map)
{ WriteUnlock(&map->lock); }
#ifdef __cplusplus
}
#endif
#endif /* AL_UINTMAP_H */