Merges a patch form naclports.

* configure.in (RUBY_NACL and others): Supports PNaCl.
* dln.c: replace the old hacky dynamic loading over HTTP with nacl_io.
* file.c: tenatively use access(2) instead of eaccess.
  (rb_file_load_ok): weaken with attribute but not by postprocess.
* io.c (socket.h): now NaCl has socket.h
  (flock): disable here instead of nacl/ioctl.h
* nacl/GNUmakefile.in (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: removed. move the hack to io.c.
* nacl/nacl-config.rb: support arm, pnacl and others.
* nacl/pepper_main.c: support build in a naclports tree.
* ruby.c (rb_load_file): weaken with attribute but not by postprocess.

The patch is by sbc@google.com and the Native Client Authors.
It is available at:
* https://chromium.googlesource.com/external/naclports.git/+/873ca4910a5f9d4206306aacb4ed79c587c6a5f3/ports/ruby/nacl.patch

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Allow failure of sighandler installation on NativeClient.

* 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@47873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
Support build for Portable Native Client outside of naclports tree.

* configure.in (RUBY_NACL): automatically locate pnacl-clang.
  (RUBY_PLATFORM): pnacl instead of le32-nacl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
configure.in: fix typo

* configure.in: remove extra right-bracket.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
parse.y: precedence of duplicated keys

* parse.y (assocs): concatenate splatted literal hashes.  the
  former key has precedence even if duplicated literal keys
  follow.  [ruby-core:65368] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm.c: precedence of duplicated keys

* vm.c (kwmerge_i): override existing keys by new keys.
  [ruby-core:65368] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
parse.y: remove duplicate keys

* parse.y (remove_duplicate_keys): remove duplicate literal keys,
  i.e., symbols and strings.  [ruby-core:65368] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c (rb_str_intern): remove unnecessary RB_GC_GUARD

Incorrectly placed, and no longer needed since r25351

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
compile.c: fix RB_GC_GUARD usage

* compile.c (iseq_build_from_ary_exception): move RB_GC_GUARD
  (iseq_build_from_ary_body): use PRIsVALUE instead of RB_GC_GUARD

Currently unused functions, but we should set good examples for
using RB_GC_GUARD (and favoring PRIsVALUE in format strings).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Fixes build failures on Portable Native Client.

Note: Some of the fixes are for newlib in general but not NaCl-specific.

* include/ruby/intern.h (rb_fd_select): declare struct timeval, or the
  struct gets local to the function in C99.

* file.c (#include): add nacl/stat.h for PNaCl.
  (utimes): added a declaration for PNaCl.
  (stat_atimespec): stat::st_atimensec is long long but
  timespec::tv_nsec is long in PNaCl.
  (stat_mtimespec, stat_ctimespec): ditto.
  (rb_group_member): disable getgroups unless HAVE_GETGROUPS.
  (eaccess): unify the fallback to generic defined(USE_GETEUID).

* io.c: include sys/time.h for struct timeval.
  (rb_close_before_exec): nothing we can do if F_GETFD is not
  available.
  (ioctl): pnacl newlib actually doesn't have ioctl.

* process.c (maxgroups): it is used iff
   defined(_SC_NGROUPS_MAX) || defined(NGROUPS_MAX) but not
   defined(HAVE_GETGROUPS) || defined(HAVE_SETGROUPS).
  (obj2gid): fail unless the object is a Fixnum if getgrnam is not
  available.
  (disable_child_handler_fork_child): sigaction is not available in
  PNaCl newlib.

* configure.in (warnflags, strict_warnflags): avoid -ansi for strlcpy.
  (rb_cv_gcc_atomic_builtins): also check
  __atomic_or_etch because it is used in ruby_atomic.h.
  (rb_cv_gcc_sync_builtins): ditto.
  (HAVE_GETGRNAM): added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/extmk.rb: generates the rule for extinit.$(OBJEXT).
  extinit.$(OBJEXT) used to be generated by the builtin rule, thus
  didn't accept custom $(CC) and caused linkage error for cross
  compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (HAVE_UTIMENSAT): disabled for NativeClient.
  Fixes build error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove trailing spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
file.c: fix compile error on Linux

* file.c (sys/time.h): include after unistd.h to get rid of
  mismatch on struct stat and some system call functions on Linux.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2014-10-12

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: include sys/time.h only if HAVE_SYS_TIME_H

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit.rb: Hide skips by default.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: [DOC] fix typo by @yui-knk [Fixes GH-738]
  https://github.com/ruby/ruby/pull/738


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
proc.c: method body GC guard

* proc.c (rb_mod_define_method): guard method body to prevent its
  method entry from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e