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

ruby-changes:35792

From: yugui <ko1@a...>
Date: Sat, 11 Oct 2014 11:29:08 +0900 (JST)
Subject: [ruby-changes:35792] yugui:r47874 (trunk): * io.c: fix issues in the last two commits. don't disable cloexec for

yugui	2014-10-11 11:29:00 +0900 (Sat, 11 Oct 2014)

  New Revision: 47874

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47874

  Log:
    * 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.
    
    * signal.c (install_signalhandler, init_sigchld): allow failure because it
      always fails with ENOSYS on NaCl.

  Modified files:
    trunk/ChangeLog
    trunk/io.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47873)
+++ ChangeLog	(revision 47874)
@@ -1,3 +1,34 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Oct 11 11:27:14 2014  Yuki Yugui Sonoda  <yugui@y...>
+
+	* 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@y...>
+
+	* 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@y...>
+
+	* 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@z...>
 
 	* ext/socket/unixsocket.c: [DOC] Fix example to render in HTML
Index: io.c
===================================================================
--- io.c	(revision 47873)
+++ io.c	(revision 47874)
@@ -126,6 +126,10 @@ https://github.com/ruby/ruby/blob/trunk/io.c#L126
 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) https://github.com/ruby/ruby/blob/trunk/io.c#L208
     }
 }
 
-#undef HAVE_FCNTL
-#undef O_CLOEXEC
-
 void
 rb_maygvl_fd_fix_cloexec(int fd)
 {
@@ -241,7 +242,7 @@ rb_fd_fix_cloexec(int fd) https://github.com/ruby/ruby/blob/trunk/io.c#L242
 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)

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

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