Skip to content

Commit 21debb2

Browse files
committed
update dependency - bug fix for native macOS
1 parent d445900 commit 21debb2

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8...3.14)
22

33
project(
44
cthread
5-
VERSION 4.0.1.18
5+
VERSION 4.0.1.19
66
DESCRIPTION "Emulated C11 threads and thread pool, with custom malloc replacement."
77
HOMEPAGE_URL "https://github.com/zelang-dev/cthread"
88
LANGUAGES C

catomic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ typedef unsigned char c89atomic_bool;
11141114

11151115
#define c89atomic_compiler_fence() __asm__ __volatile__("":::"memory")
11161116

1117-
#if defined(__GNUC__)
1117+
#if defined(__GNUC__) && !defined(__APPLE__)
11181118
/* Legacy GCC atomic built-ins. Everything is a full memory barrier. */
11191119
#define c89atomic_thread_fence(order) __sync_synchronize(), (void)order
11201120

rpmalloc.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
#if __has_builtin(__builtin_assume)
6464
#define rpmalloc_assume(cond) __builtin_assume(cond)
65-
#elif defined(__GNUC__)
65+
#elif defined(__GNUC__) && !defined(__APPLE__)
6666
#define rpmalloc_assume(cond) \
6767
do { \
6868
if (!__builtin_expect(cond, 0)) \
@@ -94,10 +94,6 @@
9494
//! Enable asserts
9595
#define ENABLE_ASSERTS 0
9696
#endif
97-
#ifndef ENABLE_PRELOAD
98-
//! Support preloading
99-
#define ENABLE_PRELOAD 0
100-
#endif
10197
#ifndef DISABLE_UNMAP
10298
//! Disable unmapping memory pages (also enables unlimited cache)
10399
#define DISABLE_UNMAP 0

0 commit comments

Comments
 (0)