ruby-changes:65013
From: Yusuke <ko1@a...>
Date: Sat, 23 Jan 2021 13:24:24 +0900 (JST)
Subject: [ruby-changes:65013] 33fb87cc9c (master): io.c: popen is not available on emscripten
https://git.ruby-lang.org/ruby.git/commit/?id=33fb87cc9c From 33fb87cc9c1218463c54b0277f635318c1509629 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sat, 23 Jan 2021 13:22:56 +0900 Subject: io.c: popen is not available on emscripten --- io.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/io.c b/io.c index 5166739..2466cea 100644 --- a/io.c +++ b/io.c @@ -6647,6 +6647,7 @@ rb_execarg_fixup_v(VALUE execarg_obj) https://github.com/ruby/ruby/blob/trunk/io.c#L6647 char *rb_execarg_commandline(const struct rb_execarg *eargp, VALUE *prog); #endif +#ifndef __EMSCRIPTEN__ static VALUE pipe_open(VALUE execarg_obj, const char *modestr, int fmode, const convconfig_t *convconfig) @@ -6876,6 +6877,14 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode, https://github.com/ruby/ruby/blob/trunk/io.c#L6877 #endif return port; } +#else +static VALUE +pipe_open(VALUE execarg_obj, const char *modestr, int fmode, + const convconfig_t *convconfig) +{ + rb_raise(rb_eNotImpError, "popen() is not available"); +} +#endif static int is_popen_fork(VALUE prog) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/