unecessary macros and K&R style coding

* strftime.c: remove unnecessary macros to check traditional C.
  https://github.com/ruby/ruby/pull/46 by lateau (Daehyub Kim).
* vsnprintf.c: remove K&R.


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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_printf.rb: need to be infected

* test/-ext-/test_printf.rb (Test_SPrintf#test_{taint,untrust}): use
  plain object so that the results of to_s and inspect are infected.
  [ruby-dev:46053] [Bug #6881]


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

* common.mk (test-ruby): include -ext- tests, which check for core
  API and behavior.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
object.c: forbid uninitialized class

* object.c (rb_class_initialize): forbid inheriting uninitialized
  class.  another class tree not based on BasicObject cannot exist.
  [ruby-core:47148][Bug #6863]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c, vm_core.h: simplify tracing mechanism.
  (1) add rb_hook_list_t data structure which includes
  hooks, events (flag) and `need_clean' flag.
  If the last flag is true, then clean the hooks list.
  In other words, deleted hooks are contained by `hooks'.
  Cleanup process should run before traversing the list.
  (2) Change check mechanism
  See EXEC_EVENT_HOOK() in vm_core.h.
  (3) Add `raw' hooks APIs
  Normal hooks are guarded from exception by rb_protect().
  However, this protection is overhead for too simple
  functions which never cause exceptions.  `raw' hooks
  are executed without protection and faster.
  Now, we only provide registration APIs.  All `raw'
  hooks are kicked under protection (same as normal hooks).
* include/ruby/ruby.h: remove internal data definition and
  macros.
* internal.h (ruby_suppress_tracing), vm_trace.c: rename
  ruby_suppress_tracing() to rb_suppress_tracing()
  and remove unused function parameter.
* parse.y: fix to use renamed rb_suppress_tracing().
* thread.c (thread_create_core): no need to set RUBY_VM_VM.
* vm.c (mark_event_hooks): move definition to vm_trace.c.
* vm.c (ruby_vm_event_flags): add a global variable.
  This global variable represents all of Threads and VM's
  event masks (T1#events | T2#events | ... | VM#events).
  You can check the possibility kick trace func or not
  with ruby_vm_event_flags.
  ruby_vm_event_flags is maintained by vm_trace.c.
* cont.c (fiber_switch, rb_cont_call): restore tracing status.
  [Feature #4347]
* test/ruby/test_continuation.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm_trace.c: remove meaningless assingments

* vm_trace.c (call_trace_func): remove meaningless assingments to same
  variables.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from
  the callback method. (Fiddle already allows it.)
  [Bug #6389] [ruby-dev:45604]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* id.c: move vm_opts.h dependency.

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

* Makefile.in, common.mk (incs): replace real header with the
  timestamp file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
id.h.tmpl: joke method names

* template/id.h.tmpl (method_ids): create also joke method names
  non-separatedly.

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

* template/id.h.tmpl (preserved_ids): move from parse.y.

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

* object.c (rb_any_to_s, rb_obj_inspect): preserve encodings of class
  name and instance variable names.

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

* common.mk (ID_H_TARGET, parse.h): fix VPATH rules with nmake.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
enc/depend: fix inplace-build condition

* enc/depend: fix inplace-build condition.  enc.mk is generated with
  setting $srcdir to enc, but pwd is still top build direcory.
  [ruby-core:47236] [Bug #6888]

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb: fix typo.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Merge branch 'pullreq/129' into trunk

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