* bootstraptest/test_io.c: add a test for [ruby-dev:46834].

* io.c (rb_cloexec_fcntl_dupfd) Use an emulation with dup(2) when
  fcntl(2) and/or F_DUPFD is unavailable.
  Suggested by akr.

* configure.in (HAVE_FCNTL): NativeClient does not provide fcntl(2).

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