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

ruby-changes:67172

From: Nobuyoshi <ko1@a...>
Date: Mon, 16 Aug 2021 18:32:48 +0900 (JST)
Subject: [ruby-changes:67172] a8714b83c4 (master): `popen()` is not available on emscripten

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

From a8714b83c40c8736b4ddafef08fa5f0091c9b101 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 16 Aug 2021 17:00:19 +0900
Subject: `popen()` is not available on emscripten

---
 io.c      | 6 +++++-
 process.c | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/io.c b/io.c
index 4d5c3ac..533542b 100644
--- a/io.c
+++ b/io.c
@@ -6625,6 +6625,7 @@ struct popen_arg { https://github.com/ruby/ruby/blob/trunk/io.c#L6625
 #endif
 
 #ifdef HAVE_WORKING_FORK
+# ifndef __EMSCRIPTEN__
 static void
 popen_redirect(struct popen_arg *p)
 {
@@ -6655,6 +6656,7 @@ popen_redirect(struct popen_arg *p) https://github.com/ruby/ruby/blob/trunk/io.c#L6656
         }
     }
 }
+# endif
 
 #if defined(__linux__)
 /* Linux /proc/self/status contains a line: "FDSize:\t<nnn>\n"
@@ -6735,6 +6737,7 @@ rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds) https://github.com/ruby/ruby/blob/trunk/io.c#L6737
 #endif
 }
 
+# ifndef __EMSCRIPTEN__
 static int
 popen_exec(void *pp, char *errmsg, size_t errmsg_len)
 {
@@ -6742,9 +6745,10 @@ popen_exec(void *pp, char *errmsg, size_t errmsg_len) https://github.com/ruby/ruby/blob/trunk/io.c#L6745
 
     return rb_exec_async_signal_safe(p->eargp, errmsg, errmsg_len);
 }
+# endif
 #endif
 
-#if defined(HAVE_WORKING_FORK) || defined(HAVE_SPAWNV)
+#if (defined(HAVE_WORKING_FORK) || defined(HAVE_SPAWNV)) && !defined __EMSCRIPTEN__
 static VALUE
 rb_execarg_fixup_v(VALUE execarg_obj)
 {
diff --git a/process.c b/process.c
index 22fa8bd..d9853e5 100644
--- a/process.c
+++ b/process.c
@@ -4536,7 +4536,7 @@ rb_syswait(rb_pid_t pid) https://github.com/ruby/ruby/blob/trunk/process.c#L4536
     rb_waitpid(pid, &status, 0);
 }
 
-#if !defined HAVE_WORKING_FORK && !defined HAVE_SPAWNV
+#if !defined HAVE_WORKING_FORK && !defined HAVE_SPAWNV && !defined __EMSCRIPTEN__
 char *
 rb_execarg_commandline(const struct rb_execarg *eargp, VALUE *prog)
 {
-- 
cgit v1.1


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

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