ossl.c: check integer overflow

* ext/openssl/ossl.c (Init_ossl_locks): check integer overflow.
  OPENSSL_malloc() takes int only.

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

* ext/openssl/ossl.c (Init_ossl_locks): check if locks array is
  allocated successfully.

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

* ext/openssl/ossl.c (Init_ossl_locks): use rb_gc_register_mark_object
  instead of rb_global_variable.  probably RArray may be used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ossl.c: fix argument type

* ext/openssl/ossl.c (ossl_lock_callback): fix argument type, and
  remove redundant casts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/net/http/test_http.rb (TestNetHTTP_v1_2#test_get,
  TestNetHTTP_v1_2_chunked#test_get): shoudn't check
  HttpResponse#decode_content if Zlib is not available.
  ko1 complained via IRC.


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

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
process.c: kill threads in daemon process

* process.c (fork_daemon): kill the other threads all and abandon the
  kept mutexes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Turns out [Fix GH-***] doesn't work while [Fixes GH-***] does.

Fix existing tags for future reference.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
bignum.c: select by preprocessor conditions

* bignum.c (maxpow_in_bdigit_dbl, maxpow_in_bdigit): select by
  preprocessor conditions to reduce dead code and suppress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix test failure introduced at r41873

it needs switching windows or othres because lib/rubygems/test_case.rb:283
switches the platform string.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix shebang test failure introduced at r41873

On Windows, it doesn't use /usr/bin/env.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix PATH environ related test failure introduced at r41873

On Windows PATH_SEPARATOR is ';'.
Therefore it can't be hardcoded.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Use Tempfile.create to unlink the tempfile on Windows

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c (SIZEOF_BDIGIT_DBL): Add a ifdef guard for test.


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

* internal.h (STATIC_ASSERT): move from enum.c.

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

* bignum.c (sizeof_bdigit_dbl): check sizeof(BDIGIT_DBL).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c (bary_2comp): Don't use bary_plus_one.
  (bary_add_one): Replaced by the implementation of bary_plus_one.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_index): cache single byte flag and some
  cosmetic changes.

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