file.c: rb_sys_fail_path_with_func

* file.c (rb_sys_fail_path_with_func): share same function, and path
  may be nil.

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

* internal.h (rb_sys_fail_path_with_func): export for
  socket/basicsocket.c.

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

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

* error.c (syserr_initialize): add optional function name.

* error.c (rb_sys_fail_path_in): rename and move from file.c, and pass
  func_name to SystemCallError#initialize.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/rubygems/test_gem_package.rb (test_verify_nonexistent): should
  make no assumptions on system error messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/rubygems/test_gem_package.rb (test_verify_nonexistent): fix
  syntax error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
time.c: check re-initialize

* time.c (GetTimeval): check if already initialized instance.
* time.c (GetNewTimeval): check if newly created instance.
* time.c (time_init_0, time_init_1, time_init_copy, time_mload): must
  be newly created instance.  [ruby-core:53436] [Bug #8099]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_lazy_enumerator.rb (TestLazyEnumerator#test_drop_while):
  Modify while condition to show dropping remains off after first false
  value. This change was made in 39711.


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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
r39766 denied to initialized already initialized time object

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c (numberof): renamed from ARRAY_SIZE() because
  other all files use numberof().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (_FORTIFY_SOURCE): added a few comments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: check struct timeval exist or not.
* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
  properly. and don't include sys/time.h if struct timeval exist.

* file.c: include sys/time.h explicitly.
* random.c: ditto.
* thread_pthread.c: ditto.
* time.c: ditto.
* ext/date/date_strftime.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/missing.h (struct timespec): include <sys/time.h>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/missing.h (__syscall): moved to...
* io.c: here. because __syscall() is only used from io.c.

* include/ruby/missing.h: move "#include <sys/type.h>" to ....
* include/ruby/intern.h: here. because it was introduced for
  fixing NFDBITS issue. [ruby-core:05179].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: disabled _FORTIFY_SOURCE for avoid to hit glibc bug.
  [Bug #8080] [ruby-core:53349]
* test/ruby/test_io.rb (TestIO#test_io_select_with_many_files):
  test for the above.

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

* io.c (max_file_descriptor): rb_atomic_t for ATOMIC_CAS().

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

* configure.in: struct timeval is defined in winsock2.h on mingw.

* include/ruby/missing.h: include time.h for time_t, and sys/time.h
  for timeval and timespec.

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

* ext/io/console/console.c (console_iflush, console_oflush): supppress
  unused-but-set-variable warnings on no tcflush.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Makefile.sub: fix mswin build

* win32/Makefile.sub (config.h): fix mswin build, also VC has time.h
  and struct timeval.

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