Skip to content

Commit 415c3ac

Browse files
committed
build: change CMARK_THREADING to 0 or 1
1 parent 0627c66 commit 415c3ac

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Diff for: src/config.h.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
extern "C" {
66
#endif
77

8-
#cmakedefine CMARK_THREADING
8+
#cmakedefine01 CMARK_THREADING
99

1010
#ifdef __cplusplus
1111
}

Diff for: src/include/cmark-gfm_config.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
extern "C" {
1313
#endif
1414

15-
#define CMARK_THREADING
15+
#ifndef CMARK_THREADING
16+
#if defined(__wasi__) && !defined(_REENTRANT)
17+
#define CMARK_THREADING 0
18+
#else
19+
#define CMARK_THREADING 1
20+
#endif
21+
#endif
1622

1723
#ifdef __cplusplus
1824
}

Diff for: src/include/mutex.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55

66
#include <stdbool.h>
77

8-
#ifndef CMARK_THREADING
9-
#if !defined(__wasi__) || defined(_REENTRANT)
10-
#define CMARK_THREADING
11-
#endif
12-
#endif
13-
14-
#ifdef CMARK_THREADING
8+
#if CMARK_THREADING
159

1610
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__wasi__)
1711
#include <unistd.h>

0 commit comments

Comments
 (0)