build: change CMARK_THREADING to 0 or 1

This commit is contained in:
Kenta Kubo
2024-11-05 01:54:03 +09:00
parent 0627c66d5f
commit 415c3ac674
3 changed files with 9 additions and 9 deletions

View File

@@ -5,7 +5,7 @@
extern "C" {
#endif
#cmakedefine CMARK_THREADING
#cmakedefine01 CMARK_THREADING
#ifdef __cplusplus
}

View File

@@ -12,7 +12,13 @@
extern "C" {
#endif
#define CMARK_THREADING
#ifndef CMARK_THREADING
#if defined(__wasi__) && !defined(_REENTRANT)
#define CMARK_THREADING 0
#else
#define CMARK_THREADING 1
#endif
#endif
#ifdef __cplusplus
}

View File

@@ -5,13 +5,7 @@
#include <stdbool.h>
#ifndef CMARK_THREADING
#if !defined(__wasi__) || defined(_REENTRANT)
#define CMARK_THREADING
#endif
#endif
#ifdef CMARK_THREADING
#if CMARK_THREADING
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__wasi__)
#include <unistd.h>