Skip to content

Commit 38c6b8f

Browse files
committed
Prevent symbol clash in case boost/cstdint.h is already included
1 parent 2a5517a commit 38c6b8f

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

include/lsl_c.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
#if defined(LIBLSL_FFI)
55
// Skip any typedefs that might confuse a FFI header parser, e.g. cffi
66
#elif defined(_MSC_VER) && _MSC_VER < 1600
7+
#if !defined(__STDC_CONSTANT_MACROS) && !defined(BOOST_CSTDINT_HPP)
78
typedef signed char int8_t;
89
typedef signed short int16_t;
910
typedef unsigned short uint16_t;
1011
typedef signed int int32_t;
1112
typedef signed long long int64_t;
1213
typedef unsigned int uint32_t;
14+
typedef unsigned long long uint64_t;
15+
#endif
1316
#else
1417
#include <stdint.h>
1518
#endif

src/lsl_continuous_resolver_c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#include "../include/lsl_c.h"
21
#include "resolver_impl.h"
32
#include "api_config.h"
43
#include <iostream>
54

65
extern "C" {
6+
#include "../include/lsl_c.h"
77
// === implementation of the continuous_resolver class ===
88

99
using namespace lsl;

src/lsl_freefuncs_c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include "../include/lsl_c.h"
21
#include "common.h"
32
#include "resolver_impl.h"
43
#include "api_config.h"
@@ -13,6 +12,7 @@ using std::string;
1312
using std::vector;
1413

1514
extern "C" {
15+
#include "../include/lsl_c.h"
1616
/**
1717
* Get the protocol version.
1818
*/

src/lsl_inlet_c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#include "../include/lsl_c.h"
21
#include "stream_inlet_impl.h"
32

43
extern "C" {
4+
#include "../include/lsl_c.h"
55
// === implementation of the stream_inlet class ===
66

77
using namespace lsl;

src/lsl_outlet_c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#include "../include/lsl_c.h"
21
#include "stream_outlet_impl.h"
32

43

54
extern "C" {
5+
#include "../include/lsl_c.h"
66
// === implementation of the lsl_outlet functions of the C API ===
77

88
using namespace lsl;

0 commit comments

Comments
 (0)