Fix build with MinGW tooling. (#514)
Courtesy of @Eli-Zaretskii, these fixes should unblock people from building tree-sitter with MinGW. I don't think this is an unreasonable maintenance burden, especially given the Emacs project's interest in using tree-sitter, but @maxbrunsfeld gets the final call.
This commit is contained in:
parent
9a73277389
commit
39bfcdf595
4 changed files with 5 additions and 5 deletions
|
|
@ -12,11 +12,11 @@ static inline size_t atomic_load(const volatile size_t *p) {
|
|||
}
|
||||
|
||||
static inline uint32_t atomic_inc(volatile uint32_t *p) {
|
||||
return InterlockedIncrement(p);
|
||||
return InterlockedIncrement((long volatile *)p);
|
||||
}
|
||||
|
||||
static inline uint32_t atomic_dec(volatile uint32_t *p) {
|
||||
return InterlockedDecrement(p);
|
||||
return InterlockedDecrement((long volatile *)p);
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ static inline uint32_t bitmask_for_index(uint16_t id) {
|
|||
return (1u << (31 - id));
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined _WIN32 && !defined __GNUC__
|
||||
|
||||
#include <intrin.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#define MAX_NODE_POOL_SIZE 50
|
||||
#define MAX_ITERATOR_COUNT 64
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined _WIN32 && !defined __GNUC__
|
||||
#define inline __forceinline
|
||||
#else
|
||||
#define inline static inline __attribute__((always_inline))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue