Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add partial support for WASI #75

Open
wants to merge 4 commits into
base: gfm
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
build: change CMARK_THREADING to 0 or 1
  • Loading branch information
kkebo committed Nov 4, 2024
commit 149b31f65bf20a0cd4897d561e3c16fc2a3fe804
2 changes: 1 addition & 1 deletion src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
extern "C" {
#endif

#cmakedefine CMARK_THREADING
#cmakedefine01 CMARK_THREADING

#ifdef __cplusplus
}
Expand Down
8 changes: 7 additions & 1 deletion src/include/cmark-gfm_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
8 changes: 1 addition & 7 deletions src/include/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down