aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-11 02:29:00 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-11 02:29:00 +0000
commite4ac591a209890cc9e9d1a9333a4e0ec9c77c901 (patch)
tree8f19bb1fefeb6f0c4249e834bfdcc895d7edc79c
parent1a14a7a1d78092161cd296d0aa14b7a17ce46edd (diff)
downloadruby-e4ac591a209890cc9e9d1a9333a4e0ec9c77c901.tar.gz
* io.c: fix issues in the last two commits. don't disable cloexec for
platforms other than NativeClient. * ChangeLog: ditto. add entries for the last two commits. Sat Oct 11 11:12:00 2014 Yuki Yugui Sonoda <yugui@yugui.jp> * signal.c (install_signalhandler, init_sigchld): allow failure because it always fails with ENOSYS on NaCl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog31
-rw-r--r--io.c9
2 files changed, 36 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4bfc32a82d..dc53677c77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+Sat Oct 11 11:27:14 2014 Yuki Yugui Sonoda <yugui@yugui.jp>
+
+ * io.c: fix issues in the last two commits. don't disable cloexec for
+ platforms other than NativeClient.
+ * ChangeLog: ditto. add entries for the last two commits.
+
+Sat Oct 11 11:12:00 2014 Yuki Yugui Sonoda <yugui@yugui.jp>
+
+ * signal.c (install_signalhandler, init_sigchld): allow failure because it
+ always fails with ENOSYS on NaCl.
+
+Sat Oct 11 11:11:53 2014 Yuki Yugui Sonoda <yugui@yugui.jp>
+
+ * configure.in (RUBY_NACL and others): merge patch from naclports. Supports PNaCl.
+ * dln.c: ditto. replace the old hacky dynamic loading over HTTP with nacl_io.
+ * file.c: ditto. tenatively use access(2) instead of eaccess.
+ (rb_file_load_ok): weaken with attribute but not by postprocess.
+ * io.c: ditto.
+ (socket.h): now NaCl has socket.h
+ (flock): disable here instead of nacl/ioctl.h
+ * nacl/GNUmakefile.in: ditto.
+ (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY):
+ respect path to them if they are absolute.
+ This helps naclports to build ruby in their source tree.
+ (PROGRAM_NMF, .SUFFIXES): support .pnexe for PNaCl.
+ (ruby.o, file.o): move the hack to attributes in ruby.c and file.c
+ * nacl/ioctl.h: ditto. removed. move the hack to io.c.
+ * nacl/nacl-config.rb: ditto. support arm, pnacl and others.
+ * nacl/pepper_main.c: ditto. support build in a naclports tree.
+ * ruby.c (rb_load_file): ditto. weaken with attribute but not by postprocess.
+
Sat Oct 11 09:32:00 2014 Zachary Scott <e@zzak.io>
* ext/socket/unixsocket.c: [DOC] Fix example to render in HTML
diff --git a/io.c b/io.c
index 4f98031c40..61c87206d9 100644
--- a/io.c
+++ b/io.c
@@ -126,6 +126,10 @@
off_t __syscall(quad_t number, ...);
#endif
+#ifdef __native_client__
+# undef F_GETFD
+#endif
+
#define IO_RBUF_CAPA_MIN 8192
#define IO_CBUF_CAPA_MIN (128*1024)
#define IO_RBUF_CAPA_FOR(fptr) (NEED_READCONV(fptr) ? IO_CBUF_CAPA_MIN : IO_RBUF_CAPA_MIN)
@@ -204,9 +208,6 @@ rb_update_max_fd(int fd)
}
}
-#undef HAVE_FCNTL
-#undef O_CLOEXEC
-
void
rb_maygvl_fd_fix_cloexec(int fd)
{
@@ -241,7 +242,7 @@ rb_fd_fix_cloexec(int fd)
static int
rb_fix_detect_o_cloexec(int fd)
{
-#ifdef O_CLOEXEC
+#if defined(O_CLOEXEC) && defined(F_GETFD)
int flags = fcntl(fd, F_GETFD);
if (flags == -1)