[前][次][番号順一覧][スレッド一覧]

ruby-changes:70971

From: Yuta <ko1@a...>
Date: Wed, 19 Jan 2022 11:19:40 +0900 (JST)
Subject: [ruby-changes:70971] 23de01c7aa (master): [wasm] eval_inter.h gc.c vm_core.h: include wasm/setjmp.h instead of sysroot header

https://git.ruby-lang.org/ruby.git/commit/?id=23de01c7aa

From 23de01c7aa5d8f3651213b75295a4969a187a041 Mon Sep 17 00:00:00 2001
From: Yuta Saito <kateinoigakukun@g...>
Date: Sat, 15 Jan 2022 22:18:55 +0900
Subject: [wasm] eval_inter.h gc.c vm_core.h: include wasm/setjmp.h instead of
 sysroot header

---
 eval_intern.h | 6 +++++-
 gc.c          | 6 +++++-
 vm_core.h     | 6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/eval_intern.h b/eval_intern.h
index 266a84601e9..347453f4e8f 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -33,7 +33,11 @@ pass_passed_block_handler(rb_execution_context_t *ec) https://github.com/ruby/ruby/blob/trunk/eval_intern.h#L33
 #endif
 
 #include <stdio.h>
-#include <setjmp.h>
+#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
+# include "wasm/setjmp.h"
+#else
+# include <setjmp.h>
+#endif
 
 #ifdef __APPLE__
 # ifdef HAVE_CRT_EXTERNS_H
diff --git a/gc.c b/gc.c
index aca15ad4268..0d5a1336b36 100644
--- a/gc.c
+++ b/gc.c
@@ -28,7 +28,11 @@ https://github.com/ruby/ruby/blob/trunk/gc.c#L28
 #include <sys/mman.h>
 #endif
 
-#include <setjmp.h>
+#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
+# include "wasm/setjmp.h"
+#else
+# include <setjmp.h>
+#endif
 #include <stdarg.h>
 #include <stdio.h>
 
diff --git a/vm_core.h b/vm_core.h
index 11866b85e5d..12f563df175 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -62,7 +62,11 @@ https://github.com/ruby/ruby/blob/trunk/vm_core.h#L62
 #define VM_UNREACHABLE(func) UNREACHABLE
 #endif
 
-#include <setjmp.h>
+#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
+# include "wasm/setjmp.h"
+#else
+# include <setjmp.h>
+#endif
 
 #include "ruby/internal/stdbool.h"
 #include "ccan/list/list.h"
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]