merge revision(s) 33711,33713,33714,33715,33716,33717,33718,33719,33720,33721,33724,33727,33728,33752,33753: [Backport #6127]

        * io.c (ioctl_req_t): Type of req argument of ioctl() depend on platform.
          Moreover almost all linux ioctl can't be represented by 32bit integer
          (i.e. MSB is 1). We need wrap ioctl argument type.
        [Bug #5429] [ruby-dev:44589]
        * io.c (struct ioctl_arg): ditto.
        * io.c (rb_ioctl): ditto.
        * test/ruby/test_io.rb (test_ioctl_linux): add a testcase for ioctl
        * backporting patch is created by Donovan Lampa.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2012-10-11

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 33819,33839:

        * io.c (ioctl_narg_len): don't use _IOC_SIZE macro on Linux.
          On Linux some constants for ioctl(2) doesn't include the size of
          its return value and 16bit value; for example FIONREAD 0x541B.
          Moreover the manual, ioctl_list(2),  says "Note  that  the  size
          bits  are  very unreliable: in lots of cases they are wrong,
          either because of buggy macros using sizeof(sizeof(struct)),
          or because of legacy values."
          So we shouldn't use it.

        * io.c (ioctl_narg_len, linux_iocparm_len): reinstantiate linux
          specific narg length calculation.

        * test/ruby/test_io.rb (test_ioctl_linux2): add new test for old and
          unstructured ioctl.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Remove wrong tests of r37144


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_cloexec_fcntl_dupfd): get rid of compile error on windows.
  reported by Donovan Lampa at [ruby-core:43152] [Backport #6127],
  based on a patch by Hiroshi Shirosaki at [ruby-core:47917].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 35015:

* numeric.c (flodivmod): must through the same pass if HAVE_FMOD or not.
  this is a bugfix of r35013.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 33215:

	* test/rexml/test_encoding.rb:
	  Add require 'require 'rexml/document'


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 36847,36873: [Backport #7115]

	* configure.in (LIBDIR_BASENAME): use configured libdir value to fix
	  --enable-load-relative on systems where libdir is not default value,
	  overridden in config.site files.  [ruby-core:47267] [Bug #6903]

	* ruby.c (ruby_init_loadpath_safe): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 33857,37157:

	Run the test only if /dev/tty exists.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 37068:

	* error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not
	  taint messages.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 37163:

	* file.c (rb_get_path_check): path name must not contain NUL bytes.


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