diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-25 07:11:34 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-25 07:11:34 +0000 |
commit | 31409cbf7f56d72df0049306a2345c6f40f08ed6 (patch) | |
tree | 46f181a4f0baf86620a217a287f214e25f669273 | |
parent | f5dbd9dbec7efba4d9c25f39a619149533c3d4dd (diff) | |
parent | f0806c4863c4440f9644ef0aea233739269ed45a (diff) |
Release branch of Ruby 2.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@48992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
83 files changed, 1650 insertions, 520 deletions
diff --git a/.gitignore b/.gitignore index 847f6e60f8..a9104e9ed5 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,9 @@ y.tab.c # /ext/etc/ /ext/etc/constdefs.h +# /ext/fiddle/ +/ext/fiddle/libffi-* + # /ext/rbconfig/ /ext/rbconfig/sizeof/sizes.c @@ -1,4 +1,108 @@ -Wed Dec 24 03:37:11 2014 NARUSE, Yui <naruse@ruby-lang.org> +Thu Dec 25 16:01:19 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * file.c (rb_file_expand_path_internal): drop characters ignored + by filesystem on Mac OS X. + +Thu Dec 25 15:36:15 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * dir.c (replace_real_basename): get the real name and replace the + base name with it by getattrlist(2) if available. + suggested by Matthew Draper at [ruby-core:67116]. [Bug #10015] + + * dir.c (glob_helper): get the real name of the whole path, not + only the last name. + +Thu Dec 25 13:59:17 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * configure.in (NET_LUID): include also ifdef.h as a workaround of + a bug in mingw-w64 header. [ruby-core:67103] [Bug #10640] + +Thu Dec 25 12:47:44 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * parse.y (gettable_gen): warn possible reference to a local + variable defined in a past scope. + +Thu Dec 25 10:09:14 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/io/console/console.c (console_dev): id_console is not a + constant name, use rb_const_remove() to get rid of NameError. + +Thu Dec 25 09:18:55 2014 NAKAMURA Usaku <usa@ruby-lang.org> + + * test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address): + set timeout for recvfrom because if client thread is crashed, it + waits infinity. + +Thu Dec 25 08:42:11 2014 Eric Wong <e@80x24.org> + + * lib/uri/generic.rb (split_userinfo): fstring for 1-byte split + (set_port): reduce bytecode size + (check_path): reduce garbage via opt_str_freeze + (query=): ditto + (fragment=): ditto + [misc #10628] + * lib/uri/rfc3986_parser.rb (regexp): cache as attr + (initialize): setup and freeze regexp attr once + (split): reduce bytecode size, use opt_str_freeze + (parse): minor bytecode and garbage reduction + (default_regexp): rename for initialize + +Wed Dec 24 20:38:16 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * dir.c (glob_make_pattern): restrict searching case-insensitive + name from the filesystem to only last part, for the performance. + [ruby-core:63591] [Bug #10015] + +Wed Dec 24 18:21:27 2014 Koichi Sasada <ko1@atdot.net> + + * gc.c: remove unused rb_objspace_t::rgengc::old_objects_at_gc_start. + +Wed Dec 24 13:25:22 2014 NARUSE, Yui <naruse@ruby-lang.org> + + * tool/redmine-backporter.rb: require view_changesets permission. + +Wed Dec 24 13:00:24 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * tool/downloader.rb (Downloader.download): fix the exception to + re-raise. initialize methods of subclasses of Exception may + have different parameters. [ruby-core:67086] [Bug #10639] + +Wed Dec 24 12:16:19 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ruby.h (rb_data_type_t): revert r48647 and revise parent member. + [ruby-core:66969] [Bug #10621] + +Wed Dec 24 05:40:52 2014 NARUSE, Yui <naruse@ruby-lang.org> + + * tool/downloader.rb: use config.guess in gcc repo. + +Wed Dec 24 11:50:19 2014 Koichi Sasada <ko1@atdot.net> + + * hash.c (rb_hash_delete): return Qnil if there are no corresponding + entry. [Bug #10623] + + * hash.c (rb_hash_delete_entry): try delete and return Qundef if there + are no corresponding entry. + + * internal.h: add rb_hash_delete_entry()'s declaration. + + * symbol.c: use rb_hash_delete_entry(). + + * thread.c: use rb_hash_delete_entry(). + + * ext/-test-/hash/delete.c: use rb_hash_delete_entry(). + +Wed Dec 24 09:35:11 2014 NAKAMURA Usaku <usa@ruby-lang.org> + + * ext/fiddle/extconf.rb: remove ffitarget.h generated by configure on + mswin, because it's not normal file (cygwin's symlink) and have + system attribute. + +Wed Dec 24 05:40:52 2014 NARUSE, Yui <naruse@ruby-lang.org> + + * tool/downloader.rb: support ruby 1.8. + +Wed Dec 24 02:44:06 2014 NARUSE, Yui <naruse@ruby-lang.org> * lib/net/http/response.rb (Net::HTTPResponse): require one or more spaces [Bug #10591]. @@ -6,34 +110,117 @@ Wed Dec 24 03:37:11 2014 NARUSE, Yui <naruse@ruby-lang.org> https://github.com/ruby/ruby/pull/782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. -Wed Dec 24 03:22:49 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> +Wed Dec 24 02:12:22 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * tool/make-snapshot (package): VCS#branch_list expects glob a + pattern string but not a regexp. based on the patch by Vit + Ondruch. in [ruby-core:67064]. [Bug #10636] + + * tool/vcs.rb (VCS::SVN#branch_list): strip newlines. + + * tool/vcs.rb (VCS::GIT.get_revisions): retrieve modified time + from toplevel log too. + + * tool/vcs.rb (VCS::GIT#branch_list): yield for each lines. + +Wed Dec 24 00:23:13 2014 NAKAMURA Usaku <usa@ruby-lang.org> + + * tool/extlibs.rb (do_extract): the pipe should be binmode. + +Wed Dec 24 00:21:44 2014 NAKAMURA Usaku <usa@ruby-lang.org> + + * Makefile.in, common.mk: move common-srcs to Makefile.in because + it breaks build on mswin. + +Wed Dec 24 00:04:45 2014 NAKAMURA Usaku <usa@ruby-lang.org> + + * lib/open-uri.rb (OpenURI.open_http): accept multiple certs path in + ssl_ca_certs. + + * tool/downloader.rb: use certs of rubygems for downloading gems. + +Tue Dec 23 22:39:11 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/fiddle/extlibs: libffi-3.2.1 and patch for mswin. + +Tue Dec 23 22:04:38 2014 NARUSE, Yui <naruse@ruby-lang.org> + + * lib/uri/generic.rb (URI::Generic#query=): don't escape [\]^ + on both rfc2396 and rfc3986. [Bug #10619] + +Tue Dec 23 16:03:35 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/win32/lib/win32/registry.rb (Win32::Registry::Error#initialize): + try en_US message if the default message cannot be encoded to + locale. [ruby-core:65295] [Bug #10300] + +Tue Dec 23 11:42:14 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/openssl/ossl_cipher.c (ossl_cipher_update_long): update huge data gradually not to exceed INT_MAX. workaround of OpenSSL API limitation. [ruby-core:67043] [Bug #10633] -Wed Dec 24 03:16:32 2014 NARUSE, Yui <naruse@ruby-lang.org> +Mon Dec 22 21:30:16 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp> - * lib/uri/generic.rb (URI::Generic#query=): don't escape [\]^ - on both rfc2396 and rfc3986. [Bug #10619] + * test/win32ole/test_win32ole_event.rb: some tests are + executed on standard Windows OS without ADO. -Wed Dec 24 03:12:28 2014 Eric Wong <e@80x24.org> +Mon Dec 22 14:08:31 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> - * test/test_weakref.rb (test_repeated_object_leak): increase timeout - [Bug #10618] + * signal.c (received_signal): fix condition to define. + [ruby-core:67032] [Bug #10629] -Wed Dec 24 02:22:11 2014 Tanaka Akira <akr@fsij.org> +Sun Dec 21 10:51:51 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp> + + * test/win32ole/test_win32ole_event.rb: test_s_new_exception is + executed on standard Windows OS without ADO. + +Sun Dec 21 08:35:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * configure.in (jemalloc): fix option argument, should use + `$withval` but not `yes` always. [ruby-core:66994] [Bug #10625] + + * configure.in (jemalloc): defer adding the liner option to get + rid of linking contest against jemalloc, so that it works + without runtime dynamic load path. + +Sat Dec 20 17:49:03 2014 Tanaka Akira <akr@fsij.org> * lib/tmpdir.rb (Dir.mktmpdir): Accept nil again, as Ruby 2.1. [ruby-core:66943] [Bug #10616] Fixed by Alex Slynko. -Sat Dec 20 04:58:00 2014 Kenta Murata <mrkn@cookpad.com> +Sat Dec 20 11:22:58 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/fiddle/depend, ext/fiddle/extconf.rb: try to build bundled + libffi if existing. + +Sat Dec 20 05:21:00 2014 Eric Wong <e@80x24.org> + + * test/test_weakref.rb (test_repeated_object_leak): increase timeout + [Bug #10618] + +Fri Dec 19 22:33:13 2014 Tanaka Akira <akr@fsij.org> + + * tool/update-deps: Use $(hdrdir) if possible. + +Fri Dec 19 22:10:00 2014 Kenta Murata <mrkn@cookpad.com> * ext/bigdecimal/depend: Fix dependencies to make bigdecimal installable by rubygems. * ext/bigdecimal/bigdecimal.gemspec: version 1.2.6. +Fri Dec 19 20:00:19 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * include/ruby/ruby.h (PRIsVALUE): put a space after string + literals not to be confused with C++11 string literal suffix. + https://github.com/ruby/ruby/commit/a9f3eb7#commitcomment-9040169 + +Fri Dec 19 15:36:02 2014 Simon Genier <simon.genier@shopify.com> + + * hash.c (hash_equal): prefer true than the result of implicit + conversion from int returned by rb_eql() to VALUE. [Fix GH-789] + Thu Dec 18 17:45:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * configure.in (rb_cv_binary_elf): get rid of -e option of cat @@ -581,13 +768,6 @@ Sat Nov 29 16:53:14 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555] -Sat Nov 29 16:14:50 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> - - * error.c (rb_typeddata_is_kind_of, rb_check_typeddata): ditto. - - * error.c (rb_typeddata_inherited_p): deprecate. still keep for - potential binary compatibility. - Sat Nov 29 10:49:23 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * win32/win32.c (win32_direct_conv, rb_w32_readdir): convert UTF-8 diff --git a/Makefile.in b/Makefile.in index 02274e4633..177fb43a4e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -438,10 +438,7 @@ enc/encinit.$(OBJEXT): enc/encinit.c $(SETUP) up:: @$(CHDIR) "$(srcdir)" && LC_TIME=C exec $(VCSUP) -up:: - -$(Q)$(MAKE) $(MFLAGS) after-update - -after-update:: update-config_files +after-update:: update-config_files common-srcs update-mspec: @$(CHDIR) $(srcdir); \ @@ -898,9 +898,12 @@ dist: $(BASERUBY) $(srcdir)/tool/make-snapshot -srcdir=$(srcdir) tmp $(RELNAME) up:: - -$(Q)$(MAKE) $(MFLAGS) REVISION_FORCE=PHONY "$(REVISION_H)" + -$(Q)$(MAKE) $(MFLAGS) Q=$(Q) REVISION_FORCE=PHONY "$(REVISION_H)" -after-update:: update-unicode update-gems common-srcs +up:: + -$(Q)$(MAKE) $(MFLAGS) Q=$(Q) after-update + +after-update:: update-unicode update-gems extract-extlibs update-config_files: PHONY $(Q) $(BASERUBY) -C "$(srcdir)/tool" \ @@ -958,6 +961,17 @@ $(srcdir)/$(HAVE_BASERUBY:yes=lib/unicode_normalize/tables.rb): \ $(srcdir)/template/unicode_norm_gen.tmpl \ enc/unicode/data/$(UNICODE_VERSION) lib/unicode_normalize +download-extlibs: + $(Q) $(BASERUBY) -C $(srcdir) -w tool/extlibs.rb --download ext + +extract-extlibs: + $(Q) $(BASERUBY) -C $(srcdir) -w tool/extlibs.rb --all ext + +clean-extlibs: + $(Q) $(RMALL) $(srcdir)/.downloaded-cache + +CLEAN_CACHE = clean-extlibs + info: info-program info-libruby_a info-libruby_so info-arch info-program: PHONY @echo PROGRAM=$(PROGRAM) @@ -1019,8 +1033,8 @@ addr2line.$(OBJEXT): {$(VPATH)}addr2line.c addr2line.$(OBJEXT): {$(VPATH)}addr2line.h addr2line.$(OBJEXT): {$(VPATH)}config.h addr2line.$(OBJEXT): {$(VPATH)}missing.h +array.$(OBJEXT): $(hdrdir)/ruby/ruby.h array.$(OBJEXT): $(top_srcdir)/include/ruby.h -array.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h array.$(OBJEXT): {$(VPATH)}array.c array.$(OBJEXT): {$(VPATH)}config.h array.$(OBJEXT): {$(VPATH)}defines.h @@ -1042,8 +1056,8 @@ ascii.$(OBJEXT): {$(VPATH)}defines.h ascii.$(OBJEXT): {$(VPATH)}missing.h ascii.$(OBJEXT): {$(VPATH)}oniguruma.h ascii.$(OBJEXT): {$(VPATH)}regenc.h +bignum.$(OBJEXT): $(hdrdir)/ruby/ruby.h bignum.$(OBJEXT): $(top_srcdir)/include/ruby.h -bignum.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h bignum.$(OBJEXT): {$(VPATH)}bignum.c bignum.$(OBJEXT): {$(VPATH)}config.h bignum.$(OBJEXT): {$(VPATH)}defines.h @@ -1061,8 +1075,8 @@ class.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h class.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h class.$(OBJEXT): $(CCAN_DIR)/list/list.h class.$(OBJEXT): $(CCAN_DIR)/str/str.h +class.$(OBJEXT): $(hdrdir)/ruby/ruby.h class.$(OBJEXT): $(top_srcdir)/include/ruby.h -class.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h class.$(OBJEXT): {$(VPATH)}class.c class.$(OBJEXT): {$(VPATH)}config.h class.$(OBJEXT): {$(VPATH)}constant.h @@ -1084,7 +1098,7 @@ class.$(OBJEXT): {$(VPATH)}thread_native.h class.$(OBJEXT): {$(VPATH)}vm_core.h class.$(OBJEXT): {$(VPATH)}vm_debug.h class.$(OBJEXT): {$(VPATH)}vm_opts.h -compar.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +compar.$(OBJEXT): $(hdrdir)/ruby/ruby.h compar.$(OBJEXT): {$(VPATH)}compar.c compar.$(OBJEXT): {$(VPATH)}config.h compar.$(OBJEXT): {$(VPATH)}defines.h @@ -1096,8 +1110,8 @@ compile.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h compile.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h compile.$(OBJEXT): $(CCAN_DIR)/list/list.h compile.$(OBJEXT): $(CCAN_DIR)/str/str.h +compile.$(OBJEXT): $(hdrdir)/ruby/ruby.h compile.$(OBJEXT): $(top_srcdir)/include/ruby.h -compile.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h compile.$(OBJEXT): {$(VPATH)}compile.c compile.$(OBJEXT): {$(VPATH)}config.h compile.$(OBJEXT): {$(VPATH)}defines.h @@ -1122,8 +1136,8 @@ compile.$(OBJEXT): {$(VPATH)}thread_native.h compile.$(OBJEXT): {$(VPATH)}vm_core.h compile.$(OBJEXT): {$(VPATH)}vm_debug.h compile.$(OBJEXT): {$(VPATH)}vm_opts.h +complex.$(OBJEXT): $(hdrdir)/ruby/ruby.h complex.$(OBJEXT): $(top_srcdir)/include/ruby.h -complex.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h complex.$(OBJEXT): {$(VPATH)}complex.c complex.$(OBJEXT): {$(VPATH)}config.h complex.$(OBJEXT): {$(VPATH)}defines.h @@ -1139,8 +1153,8 @@ cont.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h cont.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h cont.$(OBJEXT): $(CCAN_DIR)/list/list.h cont.$(OBJEXT): $(CCAN_DIR)/str/str.h +cont.$(OBJEXT): $(hdrdir)/ruby/ruby.h cont.$(OBJEXT): $(top_srcdir)/include/ruby.h -cont.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h cont.$(OBJEXT): {$(VPATH)}config.h cont.$(OBJEXT): {$(VPATH)}cont.c cont.$(OBJEXT): {$(VPATH)}defines.h @@ -1167,8 +1181,8 @@ debug.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h debug.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h debug.$(OBJEXT): $(CCAN_DIR)/list/list.h debug.$(OBJEXT): $(CCAN_DIR)/str/str.h +debug.$(OBJEXT): $(hdrdir)/ruby/ruby.h debug.$(OBJEXT): $(top_srcdir)/include/ruby.h -debug.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h debug.$(OBJEXT): {$(VPATH)}config.h debug.$(OBJEXT): {$(VPATH)}debug.c debug.$(OBJEXT): {$(VPATH)}defines.h @@ -1191,8 +1205,8 @@ debug.$(OBJEXT): {$(VPATH)}util.h debug.$(OBJEXT): {$(VPATH)}vm_core.h debug.$(OBJEXT): {$(VPATH)}vm_debug.h debug.$(OBJEXT): {$(VPATH)}vm_opts.h +dir.$(OBJEXT): $(hdrdir)/ruby/ruby.h dir.$(OBJEXT): $(top_srcdir)/include/ruby.h -dir.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h dir.$(OBJEXT): {$(VPATH)}config.h dir.$(OBJEXT): {$(VPATH)}defines.h dir.$(OBJEXT): {$(VPATH)}dir.c @@ -1205,7 +1219,7 @@ dir.$(OBJEXT): {$(VPATH)}oniguruma.h dir.$(OBJEXT): {$(VPATH)}st.h dir.$(OBJEXT): {$(VPATH)}subst.h dir.$(OBJEXT): {$(VPATH)}util.h -dln.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +dln.$(OBJEXT): $(hdrdir)/ruby/ruby.h dln.$(OBJEXT): {$(VPATH)}config.h dln.$(OBJEXT): {$(VPATH)}defines.h dln.$(OBJEXT): {$(VPATH)}dln.c @@ -1214,7 +1228,7 @@ dln.$(OBJEXT): {$(VPATH)}intern.h dln.$(OBJEXT): {$(VPATH)}missing.h dln.$(OBJEXT): {$(VPATH)}st.h dln.$(OBJEXT): {$(VPATH)}subst.h -dln_find.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +dln_find.$(OBJEXT): $(hdrdir)/ruby/ruby.h dln_find.$(OBJEXT): {$(VPATH)}config.h dln_find.$(OBJEXT): {$(VPATH)}defines.h dln_find.$(OBJEXT): {$(VPATH)}dln.h @@ -1223,7 +1237,7 @@ dln_find.$(OBJEXT): {$(VPATH)}intern.h dln_find.$(OBJEXT): {$(VPATH)}missing.h dln_find.$(OBJEXT): {$(VPATH)}st.h dln_find.$(OBJEXT): {$(VPATH)}subst.h -dmydln.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +dmydln.$(OBJEXT): $(hdrdir)/ruby/ruby.h dmydln.$(OBJEXT): {$(VPATH)}config.h dmydln.$(OBJEXT): {$(VPATH)}defines.h dmydln.$(OBJEXT): {$(VPATH)}dmydln.c @@ -1233,8 +1247,8 @@ dmydln.$(OBJEXT): {$(VPATH)}st.h dmydln.$(OBJEXT): {$(VPATH)}subst.h dmyenc.$(OBJEXT): {$(VPATH)}dmyenc.c dmyext.$(OBJEXT): {$(VPATH)}dmyext.c +encoding.$(OBJEXT): $(hdrdir)/ruby/ruby.h encoding.$(OBJEXT): $(top_srcdir)/include/ruby.h -encoding.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h encoding.$(OBJEXT): {$(VPATH)}config.h encoding.$(OBJEXT): {$(VPATH)}defines.h encoding.$(OBJEXT): {$(VPATH)}encoding.c @@ -1248,8 +1262,8 @@ encoding.$(OBJEXT): {$(VPATH)}regenc.h encoding.$(OBJEXT): {$(VPATH)}st.h encoding.$(OBJEXT): {$(VPATH)}subst.h encoding.$(OBJEXT): {$(VPATH)}util.h +enum.$(OBJEXT): $(hdrdir)/ruby/ruby.h enum.$(OBJEXT): $(top_srcdir)/include/ruby.h -enum.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h enum.$(OBJEXT): {$(VPATH)}config.h enum.$(OBJEXT): {$(VPATH)}defines.h enum.$(OBJEXT): {$(VPATH)}encoding.h @@ -1264,8 +1278,8 @@ enum.$(OBJEXT): {$(VPATH)}oniguruma.h enum.$(OBJEXT): {$(VPATH)}st.h enum.$(OBJEXT): {$(VPATH)}subst.h enum.$(OBJEXT): {$(VPATH)}util.h +enumerator.$(OBJEXT): $(hdrdir)/ruby/ruby.h enumerator.$(OBJEXT): $(top_srcdir)/include/ruby.h -enumerator.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h enumerator.$(OBJEXT): {$(VPATH)}config.h enumerator.$(OBJEXT): {$(VPATH)}defines.h enumerator.$(OBJEXT): {$(VPATH)}encoding.h @@ -1282,8 +1296,8 @@ error.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h error.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h error.$(OBJEXT): $(CCAN_DIR)/list/list.h error.$(OBJEXT): $(CCAN_DIR)/str/str.h +error.$(OBJEXT): $(hdrdir)/ruby/ruby.h error.$(OBJEXT): $(top_srcdir)/include/ruby.h -error.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h error.$(OBJEXT): {$(VPATH)}config.h error.$(OBJEXT): {$(VPATH)}defines.h error.$(OBJEXT): {$(VPATH)}encoding.h @@ -1309,8 +1323,8 @@ eval.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h eval.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h eval.$(OBJEXT): $(CCAN_DIR)/list/list.h eval.$(OBJEXT): $(CCAN_DIR)/str/str.h +eval.$(OBJEXT): $(hdrdir)/ruby/ruby.h eval.$(OBJEXT): $(top_srcdir)/include/ruby.h -eval.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h eval.$(OBJEXT): {$(VPATH)}config.h eval.$(OBJEXT): {$(VPATH)}defines.h eval.$(OBJEXT): {$(VPATH)}encoding.h @@ -1339,8 +1353,8 @@ eval.$(OBJEXT): {$(VPATH)}vm.h eval.$(OBJEXT): {$(VPATH)}vm_core.h eval.$(OBJEXT): {$(VPATH)}vm_debug.h eval.$(OBJEXT): {$(VPATH)}vm_opts.h +file.$(OBJEXT): $(hdrdir)/ruby/ruby.h file.$(OBJEXT): $(top_srcdir)/include/ruby.h -file.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h file.$(OBJEXT): {$(VPATH)}config.h file.$(OBJEXT): {$(VPATH)}defines.h file.$(OBJEXT): {$(VPATH)}dln.h @@ -1358,8 +1372,8 @@ gc.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h gc.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h gc.$(OBJEXT): $(CCAN_DIR)/list/list.h gc.$(OBJEXT): $(CCAN_DIR)/str/str.h +gc.$(OBJEXT): $(hdrdir)/ruby/ruby.h gc.$(OBJEXT): $(top_srcdir)/include/ruby.h -gc.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h gc.$(OBJEXT): {$(VPATH)}config.h gc.$(OBJEXT): {$(VPATH)}constant.h gc.$(OBJEXT): {$(VPATH)}debug.h @@ -1395,8 +1409,8 @@ golf_prelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h golf_prelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h golf_prelude.$(OBJEXT): $(CCAN_DIR)/list/list.h golf_prelude.$(OBJEXT): $(CCAN_DIR)/str/str.h +golf_prelude.$(OBJEXT): $(hdrdir)/ruby/ruby.h golf_prelude.$(OBJEXT): $(top_srcdir)/include/ruby.h -golf_prelude.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h golf_prelude.$(OBJEXT): {$(VPATH)}config.h golf_prelude.$(OBJEXT): {$(VPATH)}defines.h golf_prelude.$(OBJEXT): {$(VPATH)}encoding.h @@ -1417,8 +1431,8 @@ golf_prelude.$(OBJEXT): {$(VPATH)}thread_native.h golf_prelude.$(OBJEXT): {$(VPATH)}vm_core.h golf_prelude.$(OBJEXT): {$(VPATH)}vm_debug.h golf_prelude.$(OBJEXT): {$(VPATH)}vm_opts.h +goruby.$(OBJEXT): $(hdrdir)/ruby/ruby.h goruby.$(OBJEXT): $(top_srcdir)/include/ruby.h -goruby.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h goruby.$(OBJEXT): {$(VPATH)}config.h goruby.$(OBJEXT): {$(VPATH)}defines.h goruby.$(OBJEXT): {$(VPATH)}goruby.c @@ -1429,8 +1443,8 @@ goruby.$(OBJEXT): {$(VPATH)}node.h goruby.$(OBJEXT): {$(VPATH)}st.h goruby.$(OBJEXT): {$(VPATH)}subst.h goruby.$(OBJEXT): {$(VPATH)}vm_debug.h +hash.$(OBJEXT): $(hdrdir)/ruby/ruby.h hash.$(OBJEXT): $(top_srcdir)/include/ruby.h -hash.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h hash.$(OBJEXT): {$(VPATH)}config.h hash.$(OBJEXT): {$(VPATH)}defines.h hash.$(OBJEXT): {$(VPATH)}encoding.h @@ -1446,8 +1460,8 @@ hash.$(OBJEXT): {$(VPATH)}st.h hash.$(OBJEXT): {$(VPATH)}subst.h hash.$(OBJEXT): {$(VPATH)}util.h hash.$(OBJEXT): {$(VPATH)}vm_opts.h +inits.$(OBJEXT): $(hdrdir)/ruby/ruby.h inits.$(OBJEXT): $(top_srcdir)/include/ruby.h -inits.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h inits.$(OBJEXT): {$(VPATH)}config.h inits.$(OBJEXT): {$(VPATH)}defines.h inits.$(OBJEXT): {$(VPATH)}encoding.h @@ -1459,8 +1473,8 @@ inits.$(OBJEXT): {$(VPATH)}missing.h inits.$(OBJEXT): {$(VPATH)}oniguruma.h inits.$(OBJEXT): {$(VPATH)}st.h inits.$(OBJEXT): {$(VPATH)}subst.h +io.$(OBJEXT): $(hdrdir)/ruby/ruby.h io.$(OBJEXT): $(top_srcdir)/include/ruby.h -io.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h io.$(OBJEXT): {$(VPATH)}config.h io.$(OBJEXT): {$(VPATH)}defines.h io.$(OBJEXT): {$(VPATH)}dln.h @@ -1481,8 +1495,8 @@ iseq.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h iseq.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h iseq.$(OBJEXT): $(CCAN_DIR)/list/list.h iseq.$(OBJEXT): $(CCAN_DIR)/str/str.h +iseq.$(OBJEXT): $(hdrdir)/ruby/ruby.h iseq.$(OBJEXT): $(top_srcdir)/include/ruby.h -iseq.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h iseq.$(OBJEXT): {$(VPATH)}config.h iseq.$(OBJEXT): {$(VPATH)}defines.h iseq.$(OBJEXT): {$(VPATH)}encoding.h @@ -1514,8 +1528,8 @@ load.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h load.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h load.$(OBJEXT): $(CCAN_DIR)/list/list.h load.$(OBJEXT): $(CCAN_DIR)/str/str.h +load.$(OBJEXT): $(hdrdir)/ruby/ruby.h load.$(OBJEXT): $(top_srcdir)/include/ruby.h -load.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h load.$(OBJEXT): {$(VPATH)}config.h load.$(OBJEXT): {$(VPATH)}defines.h load.$(OBJEXT): {$(VPATH)}dln.h @@ -1540,8 +1554,8 @@ load.$(OBJEXT): {$(VPATH)}util.h load.$(OBJEXT): {$(VPATH)}vm_core.h load.$(OBJEXT): {$(VPATH)}vm_debug.h load.$(OBJEXT): {$(VPATH)}vm_opts.h -loadpath.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h -loadpath.$(OBJEXT): $(top_srcdir)/include/ruby/version.h +loadpath.$(OBJEXT): $(hdrdir)/ruby/ruby.h +loadpath.$(OBJEXT): $(hdrdir)/ruby/version.h loadpath.$(OBJEXT): $(top_srcdir)/version.h loadpath.$(OBJEXT): {$(VPATH)}config.h loadpath.$(OBJEXT): {$(VPATH)}defines.h @@ -1551,8 +1565,8 @@ loadpath.$(OBJEXT): {$(VPATH)}missing.h loadpath.$(OBJEXT): {$(VPATH)}st.h loadpath.$(OBJEXT): {$(VPATH)}subst.h loadpath.$(OBJEXT): {$(VPATH)}verconf.h +localeinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h localeinit.$(OBJEXT): $(top_srcdir)/include/ruby.h -localeinit.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h localeinit.$(OBJEXT): {$(VPATH)}config.h localeinit.$(OBJEXT): {$(VPATH)}defines.h localeinit.$(OBJEXT): {$(VPATH)}encoding.h @@ -1564,8 +1578,8 @@ localeinit.$(OBJEXT): {$(VPATH)}missing.h localeinit.$(OBJEXT): {$(VPATH)}oniguruma.h localeinit.$(OBJEXT): {$(VPATH)}st.h localeinit.$(OBJEXT): {$(VPATH)}subst.h +main.$(OBJEXT): $(hdrdir)/ruby/ruby.h main.$(OBJEXT): $(top_srcdir)/include/ruby.h -main.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h main.$(OBJEXT): {$(VPATH)}config.h main.$(OBJEXT): {$(VPATH)}defines.h main.$(OBJEXT): {$(VPATH)}intern.h @@ -1575,8 +1589,8 @@ main.$(OBJEXT): {$(VPATH)}node.h main.$(OBJEXT): {$(VPATH)}st.h main.$(OBJEXT): {$(VPATH)}subst.h main.$(OBJEXT): {$(VPATH)}vm_debug.h +marshal.$(OBJEXT): $(hdrdir)/ruby/ruby.h marshal.$(OBJEXT): $(top_srcdir)/include/ruby.h -marshal.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h marshal.$(OBJEXT): {$(VPATH)}config.h marshal.$(OBJEXT): {$(VPATH)}defines.h marshal.$(OBJEXT): {$(VPATH)}encoding.h @@ -1589,8 +1603,8 @@ marshal.$(OBJEXT): {$(VPATH)}oniguruma.h marshal.$(OBJEXT): {$(VPATH)}st.h marshal.$(OBJEXT): {$(VPATH)}subst.h marshal.$(OBJEXT): {$(VPATH)}util.h +math.$(OBJEXT): $(hdrdir)/ruby/ruby.h math.$(OBJEXT): $(top_srcdir)/include/ruby.h -math.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h math.$(OBJEXT): {$(VPATH)}config.h math.$(OBJEXT): {$(VPATH)}defines.h math.$(OBJEXT): {$(VPATH)}encoding.h @@ -1602,7 +1616,7 @@ math.$(OBJEXT): {$(VPATH)}missing.h math.$(OBJEXT): {$(VPATH)}oniguruma.h math.$(OBJEXT): {$(VPATH)}st.h math.$(OBJEXT): {$(VPATH)}subst.h -miniinit.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +miniinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h miniinit.$(OBJEXT): {$(VPATH)}config.h miniinit.$(OBJEXT): {$(VPATH)}defines.h miniinit.$(OBJEXT): {$(VPATH)}encoding.h @@ -1612,33 +1626,8 @@ miniinit.$(OBJEXT): {$(VPATH)}missing.h miniinit.$(OBJEXT): {$(VPATH)}oniguruma.h miniinit.$(OBJEXT): {$(VPATH)}st.h miniinit.$(OBJEXT): {$(VPATH)}subst.h -miniprelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h -miniprelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h -miniprelude.$(OBJEXT): $(CCAN_DIR)/list/list.h -miniprelude.$(OBJEXT): $(CCAN_DIR)/str/str.h -miniprelude.$(OBJEXT): $(top_srcdir)/include/ruby.h -miniprelude.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h -miniprelude.$(OBJEXT): {$(VPATH)}config.h -miniprelude.$(OBJEXT): {$(VPATH)}defines.h -miniprelude.$(OBJEXT): {$(VPATH)}encoding.h -miniprelude.$(OBJEXT): {$(VPATH)}id.h -miniprelude.$(OBJEXT): {$(VPATH)}intern.h -miniprelude.$(OBJEXT): {$(VPATH)}internal.h -miniprelude.$(OBJEXT): {$(VPATH)}io.h -miniprelude.$(OBJEXT): {$(VPATH)}method.h miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c -miniprelude.$(OBJEXT): {$(VPATH)}missing.h -miniprelude.$(OBJEXT): {$(VPATH)}node.h -miniprelude.$(OBJEXT): {$(VPATH)}oniguruma.h -miniprelude.$(OBJEXT): {$(VPATH)}ruby_atomic.h -miniprelude.$(OBJEXT): {$(VPATH)}st.h -miniprelude.$(OBJEXT): {$(VPATH)}subst.h -miniprelude.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h -miniprelude.$(OBJEXT): {$(VPATH)}thread_native.h -miniprelude.$(OBJEXT): {$(VPATH)}vm_core.h -miniprelude.$(OBJEXT): {$(VPATH)}vm_debug.h -miniprelude.$(OBJEXT): {$(VPATH)}vm_opts.h -newline.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +newline.$(OBJEXT): $(hdrdir)/ruby/ruby.h newline.$(OBJEXT): {$(VPATH)}config.h newline.$(OBJEXT): {$(VPATH)}defines.h newline.$(OBJEXT): {$(VPATH)}intern.h @@ -1651,8 +1640,8 @@ node.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h node.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h node.$(OBJEXT): $(CCAN_DIR)/list/list.h node.$(OBJEXT): $(CCAN_DIR)/str/str.h +node.$(OBJEXT): $(hdrdir)/ruby/ruby.h node.$(OBJEXT): $(top_srcdir)/include/ruby.h -node.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h node.$(OBJEXT): {$(VPATH)}config.h node.$(OBJEXT): {$(VPATH)}defines.h node.$(OBJEXT): {$(VPATH)}encoding.h @@ -1673,8 +1662,8 @@ node.$(OBJEXT): {$(VPATH)}thread_native.h node.$(OBJEXT): {$(VPATH)}vm_core.h node.$(OBJEXT): {$(VPATH)}vm_debug.h node.$(OBJEXT): {$(VPATH)}vm_opts.h +numeric.$(OBJEXT): $(hdrdir)/ruby/ruby.h numeric.$(OBJEXT): $(top_srcdir)/include/ruby.h -numeric.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h numeric.$(OBJEXT): {$(VPATH)}config.h numeric.$(OBJEXT): {$(VPATH)}defines.h numeric.$(OBJEXT): {$(VPATH)}encoding.h @@ -1688,8 +1677,8 @@ numeric.$(OBJEXT): {$(VPATH)}oniguruma.h numeric.$(OBJEXT): {$(VPATH)}st.h numeric.$(OBJEXT): {$(VPATH)}subst.h numeric.$(OBJEXT): {$(VPATH)}util.h +object.$(OBJEXT): $(hdrdir)/ruby/ruby.h object.$(OBJEXT): $(top_srcdir)/include/ruby.h -object.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h object.$(OBJEXT): {$(VPATH)}config.h object.$(OBJEXT): {$(VPATH)}constant.h object.$(OBJEXT): {$(VPATH)}defines.h @@ -1706,8 +1695,8 @@ object.$(OBJEXT): {$(VPATH)}st.h object.$(OBJEXT): {$(VPATH)}subst.h object.$(OBJEXT): {$(VPATH)}util.h object.$(OBJEXT): {$(VPATH)}vm_opts.h +pack.$(OBJEXT): $(hdrdir)/ruby/ruby.h pack.$(OBJEXT): $(top_srcdir)/include/ruby.h -pack.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h pack.$(OBJEXT): {$(VPATH)}config.h pack.$(OBJEXT): {$(VPATH)}defines.h pack.$(OBJEXT): {$(VPATH)}encoding.h @@ -1719,8 +1708,8 @@ pack.$(OBJEXT): {$(VPATH)}oniguruma.h pack.$(OBJEXT): {$(VPATH)}pack.c pack.$(OBJEXT): {$(VPATH)}st.h pack.$(OBJEXT): {$(VPATH)}subst.h +parse.$(OBJEXT): $(hdrdir)/ruby/ruby.h parse.$(OBJEXT): $(top_srcdir)/include/ruby.h -parse.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h parse.$(OBJEXT): {$(VPATH)}config.h parse.$(OBJEXT): {$(VPATH)}defines.h parse.$(OBJEXT): {$(VPATH)}defs/keywords @@ -1748,8 +1737,8 @@ prelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h prelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h prelude.$(OBJEXT): $(CCAN_DIR)/list/list.h prelude.$(OBJEXT): $(CCAN_DIR)/str/str.h +prelude.$(OBJEXT): $(hdrdir)/ruby/ruby.h prelude.$(OBJEXT): $(top_srcdir)/include/ruby.h -prelude.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h prelude.$(OBJEXT): {$(VPATH)}config.h prelude.$(OBJEXT): {$(VPATH)}defines.h prelude.$(OBJEXT): {$(VPATH)}encoding.h @@ -1774,8 +1763,8 @@ proc.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h proc.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h proc.$(OBJEXT): $(CCAN_DIR)/list/list.h proc.$(OBJEXT): $(CCAN_DIR)/str/str.h +proc.$(OBJEXT): $(hdrdir)/ruby/ruby.h proc.$(OBJEXT): $(top_srcdir)/include/ruby.h -proc.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h proc.$(OBJEXT): {$(VPATH)}config.h proc.$(OBJEXT): {$(VPATH)}defines.h proc.$(OBJEXT): {$(VPATH)}encoding.h @@ -1803,8 +1792,8 @@ process.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h process.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h process.$(OBJEXT): $(CCAN_DIR)/list/list.h process.$(OBJEXT): $(CCAN_DIR)/str/str.h +process.$(OBJEXT): $(hdrdir)/ruby/ruby.h process.$(OBJEXT): $(top_srcdir)/include/ruby.h -process.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h process.$(OBJEXT): {$(VPATH)}config.h process.$(OBJEXT): {$(VPATH)}defines.h process.$(OBJEXT): {$(VPATH)}dln.h @@ -1828,8 +1817,8 @@ process.$(OBJEXT): {$(VPATH)}util.h process.$(OBJEXT): {$(VPATH)}vm_core.h process.$(OBJEXT): {$(VPATH)}vm_debug.h process.$(OBJEXT): {$(VPATH)}vm_opts.h +random.$(OBJEXT): $(hdrdir)/ruby/ruby.h random.$(OBJEXT): $(top_srcdir)/include/ruby.h -random.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h random.$(OBJEXT): {$(VPATH)}config.h random.$(OBJEXT): {$(VPATH)}defines.h random.$(OBJEXT): {$(VPATH)}encoding.h @@ -1843,8 +1832,8 @@ random.$(OBJEXT): {$(VPATH)}siphash.c random.$(OBJEXT): {$(VPATH)}siphash.h random.$(OBJEXT): {$(VPATH)}st.h random.$(OBJEXT): {$(VPATH)}subst.h +range.$(OBJEXT): $(hdrdir)/ruby/ruby.h range.$(OBJEXT): $(top_srcdir)/include/ruby.h -range.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h range.$(OBJEXT): {$(VPATH)}config.h range.$(OBJEXT): {$(VPATH)}defines.h range.$(OBJEXT): {$(VPATH)}encoding.h @@ -1857,8 +1846,8 @@ range.$(OBJEXT): {$(VPATH)}oniguruma.h range.$(OBJEXT): {$(VPATH)}range.c range.$(OBJEXT): {$(VPATH)}st.h range.$(OBJEXT): {$(VPATH)}subst.h +rational.$(OBJEXT): $(hdrdir)/ruby/ruby.h rational.$(OBJEXT): $(top_srcdir)/include/ruby.h -rational.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h rational.$(OBJEXT): {$(VPATH)}config.h rational.$(OBJEXT): {$(VPATH)}defines.h rational.$(OBJEXT): {$(VPATH)}encoding.h @@ -1870,8 +1859,8 @@ rational.$(OBJEXT): {$(VPATH)}oniguruma.h rational.$(OBJEXT): {$(VPATH)}rational.c rational.$(OBJEXT): {$(VPATH)}st.h rational.$(OBJEXT): {$(VPATH)}subst.h +re.$(OBJEXT): $(hdrdir)/ruby/ruby.h re.$(OBJEXT): $(top_srcdir)/include/ruby.h -re.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h re.$(OBJEXT): {$(VPATH)}config.h re.$(OBJEXT): {$(VPATH)}defines.h re.$(OBJEXT): {$(VPATH)}encoding.h @@ -1888,7 +1877,7 @@ re.$(OBJEXT): {$(VPATH)}regint.h re.$(OBJEXT): {$(VPATH)}st.h re.$(OBJEXT): {$(VPATH)}subst.h re.$(OBJEXT): {$(VPATH)}util.h -regcomp.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +regcomp.$(OBJEXT): $(hdrdir)/ruby/ruby.h regcomp.$(OBJEXT): {$(VPATH)}config.h regcomp.$(OBJEXT): {$(VPATH)}defines.h regcomp.$(OBJEXT): {$(VPATH)}intern.h @@ -1900,7 +1889,7 @@ regcomp.$(OBJEXT): {$(VPATH)}regint.h regcomp.$(OBJEXT): {$(VPATH)}regparse.h regcomp.$(OBJEXT): {$(VPATH)}st.h regcomp.$(OBJEXT): {$(VPATH)}subst.h -regenc.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +regenc.$(OBJEXT): $(hdrdir)/ruby/ruby.h regenc.$(OBJEXT): {$(VPATH)}config.h regenc.$(OBJEXT): {$(VPATH)}defines.h regenc.$(OBJEXT): {$(VPATH)}intern.h @@ -1911,7 +1900,7 @@ regenc.$(OBJEXT): {$(VPATH)}regenc.h regenc.$(OBJEXT): {$(VPATH)}regint.h regenc.$(OBJEXT): {$(VPATH)}st.h regenc.$(OBJEXT): {$(VPATH)}subst.h -regerror.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +regerror.$(OBJEXT): $(hdrdir)/ruby/ruby.h regerror.$(OBJEXT): {$(VPATH)}config.h regerror.$(OBJEXT): {$(VPATH)}defines.h regerror.$(OBJEXT): {$(VPATH)}intern.h @@ -1922,7 +1911,7 @@ regerror.$(OBJEXT): {$(VPATH)}regerror.c regerror.$(OBJEXT): {$(VPATH)}regint.h regerror.$(OBJEXT): {$(VPATH)}st.h regerror.$(OBJEXT): {$(VPATH)}subst.h -regexec.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +regexec.$(OBJEXT): $(hdrdir)/ruby/ruby.h regexec.$(OBJEXT): {$(VPATH)}config.h regexec.$(OBJEXT): {$(VPATH)}defines.h regexec.$(OBJEXT): {$(VPATH)}intern.h @@ -1933,7 +1922,7 @@ regexec.$(OBJEXT): {$(VPATH)}regexec.c regexec.$(OBJEXT): {$(VPATH)}regint.h regexec.$(OBJEXT): {$(VPATH)}st.h regexec.$(OBJEXT): {$(VPATH)}subst.h -regparse.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +regparse.$(OBJEXT): $(hdrdir)/ruby/ruby.h regparse.$(OBJEXT): {$(VPATH)}config.h regparse.$(OBJEXT): {$(VPATH)}defines.h regparse.$(OBJEXT): {$(VPATH)}intern.h @@ -1945,7 +1934,7 @@ regparse.$(OBJEXT): {$(VPATH)}regparse.c regparse.$(OBJEXT): {$(VPATH)}regparse.h regparse.$(OBJEXT): {$(VPATH)}st.h regparse.$(OBJEXT): {$(VPATH)}subst.h -regsyntax.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +regsyntax.$(OBJEXT): $(hdrdir)/ruby/ruby.h regsyntax.$(OBJEXT): {$(VPATH)}config.h regsyntax.$(OBJEXT): {$(VPATH)}defines.h regsyntax.$(OBJEXT): {$(VPATH)}intern.h @@ -1960,8 +1949,8 @@ ruby.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h ruby.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h ruby.$(OBJEXT): $(CCAN_DIR)/list/list.h ruby.$(OBJEXT): $(CCAN_DIR)/str/str.h +ruby.$(OBJEXT): $(hdrdir)/ruby/ruby.h ruby.$(OBJEXT): $(top_srcdir)/include/ruby.h -ruby.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h ruby.$(OBJEXT): {$(VPATH)}config.h ruby.$(OBJEXT): {$(VPATH)}defines.h ruby.$(OBJEXT): {$(VPATH)}dln.h @@ -1989,8 +1978,8 @@ safe.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h safe.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h safe.$(OBJEXT): $(CCAN_DIR)/list/list.h safe.$(OBJEXT): $(CCAN_DIR)/str/str.h +safe.$(OBJEXT): $(hdrdir)/ruby/ruby.h safe.$(OBJEXT): $(top_srcdir)/include/ruby.h -safe.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h safe.$(OBJEXT): {$(VPATH)}config.h safe.$(OBJEXT): {$(VPATH)}defines.h safe.$(OBJEXT): {$(VPATH)}encoding.h @@ -2011,8 +2000,8 @@ safe.$(OBJEXT): {$(VPATH)}thread_native.h safe.$(OBJEXT): {$(VPATH)}vm_core.h safe.$(OBJEXT): {$(VPATH)}vm_debug.h safe.$(OBJEXT): {$(VPATH)}vm_opts.h +setproctitle.$(OBJEXT): $(hdrdir)/ruby/ruby.h setproctitle.$(OBJEXT): $(top_srcdir)/include/ruby.h -setproctitle.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h setproctitle.$(OBJEXT): {$(VPATH)}config.h setproctitle.$(OBJEXT): {$(VPATH)}defines.h setproctitle.$(OBJEXT): {$(VPATH)}intern.h @@ -2025,8 +2014,8 @@ signal.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h signal.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h signal.$(OBJEXT): $(CCAN_DIR)/list/list.h signal.$(OBJEXT): $(CCAN_DIR)/str/str.h +signal.$(OBJEXT): $(hdrdir)/ruby/ruby.h signal.$(OBJEXT): $(top_srcdir)/include/ruby.h -signal.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h signal.$(OBJEXT): {$(VPATH)}config.h signal.$(OBJEXT): {$(VPATH)}defines.h signal.$(OBJEXT): {$(VPATH)}encoding.h @@ -2048,8 +2037,8 @@ signal.$(OBJEXT): {$(VPATH)}thread_native.h signal.$(OBJEXT): {$(VPATH)}vm_core.h signal.$(OBJEXT): {$(VPATH)}vm_debug.h signal.$(OBJEXT): {$(VPATH)}vm_opts.h +sprintf.$(OBJEXT): $(hdrdir)/ruby/ruby.h sprintf.$(OBJEXT): $(top_srcdir)/include/ruby.h -sprintf.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h sprintf.$(OBJEXT): {$(VPATH)}config.h sprintf.$(OBJEXT): {$(VPATH)}defines.h sprintf.$(OBJEXT): {$(VPATH)}encoding.h @@ -2065,8 +2054,8 @@ sprintf.$(OBJEXT): {$(VPATH)}sprintf.c sprintf.$(OBJEXT): {$(VPATH)}st.h sprintf.$(OBJEXT): {$(VPATH)}subst.h sprintf.$(OBJEXT): {$(VPATH)}vsnprintf.c +st.$(OBJEXT): $(hdrdir)/ruby/ruby.h st.$(OBJEXT): $(top_srcdir)/include/ruby.h -st.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h st.$(OBJEXT): {$(VPATH)}config.h st.$(OBJEXT): {$(VPATH)}defines.h st.$(OBJEXT): {$(VPATH)}encoding.h @@ -2078,7 +2067,7 @@ st.$(OBJEXT): {$(VPATH)}oniguruma.h st.$(OBJEXT): {$(VPATH)}st.c st.$(OBJEXT): {$(VPATH)}st.h st.$(OBJEXT): {$(VPATH)}subst.h -strftime.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +strftime.$(OBJEXT): $(hdrdir)/ruby/ruby.h strftime.$(OBJEXT): {$(VPATH)}config.h strftime.$(OBJEXT): {$(VPATH)}defines.h strftime.$(OBJEXT): {$(VPATH)}encoding.h @@ -2089,8 +2078,8 @@ strftime.$(OBJEXT): {$(VPATH)}st.h strftime.$(OBJEXT): {$(VPATH)}strftime.c strftime.$(OBJEXT): {$(VPATH)}subst.h strftime.$(OBJEXT): {$(VPATH)}timev.h +string.$(OBJEXT): $(hdrdir)/ruby/ruby.h string.$(OBJEXT): $(top_srcdir)/include/ruby.h -string.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h string.$(OBJEXT): {$(VPATH)}config.h string.$(OBJEXT): {$(VPATH)}defines.h string.$(OBJEXT): {$(VPATH)}encoding.h @@ -2113,21 +2102,34 @@ strlcat.$(OBJEXT): {$(VPATH)}strlcat.c strlcpy.$(OBJEXT): {$(VPATH)}config.h strlcpy.$(OBJEXT): {$(VPATH)}missing.h strlcpy.$(OBJEXT): {$(VPATH)}strlcpy.c +struct.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h +struct.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h +struct.$(OBJEXT): $(CCAN_DIR)/list/list.h +struct.$(OBJEXT): $(CCAN_DIR)/str/str.h +struct.$(OBJEXT): $(hdrdir)/ruby/ruby.h struct.$(OBJEXT): $(top_srcdir)/include/ruby.h -struct.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h struct.$(OBJEXT): {$(VPATH)}config.h struct.$(OBJEXT): {$(VPATH)}defines.h struct.$(OBJEXT): {$(VPATH)}encoding.h +struct.$(OBJEXT): {$(VPATH)}id.h struct.$(OBJEXT): {$(VPATH)}intern.h struct.$(OBJEXT): {$(VPATH)}internal.h struct.$(OBJEXT): {$(VPATH)}io.h +struct.$(OBJEXT): {$(VPATH)}method.h struct.$(OBJEXT): {$(VPATH)}missing.h +struct.$(OBJEXT): {$(VPATH)}node.h struct.$(OBJEXT): {$(VPATH)}oniguruma.h +struct.$(OBJEXT): {$(VPATH)}ruby_atomic.h struct.$(OBJEXT): {$(VPATH)}st.h struct.$(OBJEXT): {$(VPATH)}struct.c struct.$(OBJEXT): {$(VPATH)}subst.h +struct.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h +struct.$(OBJEXT): {$(VPATH)}thread_native.h +struct.$(OBJEXT): {$(VPATH)}vm_core.h +struct.$(OBJEXT): {$(VPATH)}vm_debug.h +struct.$(OBJEXT): {$(VPATH)}vm_opts.h +symbol.$(OBJEXT): $(hdrdir)/ruby/ruby.h symbol.$(OBJEXT): $(top_srcdir)/include/ruby.h -symbol.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h symbol.$(OBJEXT): {$(VPATH)}config.h symbol.$(OBJEXT): {$(VPATH)}defines.h symbol.$(OBJEXT): {$(VPATH)}encoding.h @@ -2150,8 +2152,8 @@ thread.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h thread.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h thread.$(OBJEXT): $(CCAN_DIR)/list/list.h thread.$(OBJEXT): $(CCAN_DIR)/str/str.h +thread.$(OBJEXT): $(hdrdir)/ruby/ruby.h thread.$(OBJEXT): $(top_srcdir)/include/ruby.h -thread.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h thread.$(OBJEXT): {$(VPATH)}config.h thread.$(OBJEXT): {$(VPATH)}defines.h thread.$(OBJEXT): {$(VPATH)}encoding.h @@ -2177,8 +2179,8 @@ thread.$(OBJEXT): {$(VPATH)}timev.h thread.$(OBJEXT): {$(VPATH)}vm_core.h thread.$(OBJEXT): {$(VPATH)}vm_debug.h thread.$(OBJEXT): {$(VPATH)}vm_opts.h +time.$(OBJEXT): $(hdrdir)/ruby/ruby.h time.$(OBJEXT): $(top_srcdir)/include/ruby.h -time.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h time.$(OBJEXT): {$(VPATH)}config.h time.$(OBJEXT): {$(VPATH)}defines.h time.$(OBJEXT): {$(VPATH)}encoding.h @@ -2191,8 +2193,8 @@ time.$(OBJEXT): {$(VPATH)}st.h time.$(OBJEXT): {$(VPATH)}subst.h time.$(OBJEXT): {$(VPATH)}time.c time.$(OBJEXT): {$(VPATH)}timev.h +transcode.$(OBJEXT): $(hdrdir)/ruby/ruby.h transcode.$(OBJEXT): $(top_srcdir)/include/ruby.h -transcode.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h transcode.$(OBJEXT): {$(VPATH)}config.h transcode.$(OBJEXT): {$(VPATH)}defines.h transcode.$(OBJEXT): {$(VPATH)}encoding.h @@ -2205,7 +2207,7 @@ transcode.$(OBJEXT): {$(VPATH)}st.h transcode.$(OBJEXT): {$(VPATH)}subst.h transcode.$(OBJEXT): {$(VPATH)}transcode.c transcode.$(OBJEXT): {$(VPATH)}transcode_data.h -unicode.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +unicode.$(OBJEXT): $(hdrdir)/ruby/ruby.h unicode.$(OBJEXT): {$(VPATH)}config.h unicode.$(OBJEXT): {$(VPATH)}defines.h unicode.$(OBJEXT): {$(VPATH)}intern.h @@ -2230,8 +2232,8 @@ utf_8.$(OBJEXT): {$(VPATH)}missing.h utf_8.$(OBJEXT): {$(VPATH)}oniguruma.h utf_8.$(OBJEXT): {$(VPATH)}regenc.h utf_8.$(OBJEXT): {$(VPATH)}utf_8.c +util.$(OBJEXT): $(hdrdir)/ruby/ruby.h util.$(OBJEXT): $(top_srcdir)/include/ruby.h -util.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h util.$(OBJEXT): {$(VPATH)}config.h util.$(OBJEXT): {$(VPATH)}defines.h util.$(OBJEXT): {$(VPATH)}encoding.h @@ -2244,8 +2246,8 @@ util.$(OBJEXT): {$(VPATH)}st.h util.$(OBJEXT): {$(VPATH)}subst.h util.$(OBJEXT): {$(VPATH)}util.c util.$(OBJEXT): {$(VPATH)}util.h +variable.$(OBJEXT): $(hdrdir)/ruby/ruby.h variable.$(OBJEXT): $(top_srcdir)/include/ruby.h -variable.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h variable.$(OBJEXT): {$(VPATH)}config.h variable.$(OBJEXT): {$(VPATH)}constant.h variable.$(OBJEXT): {$(VPATH)}defines.h @@ -2261,8 +2263,8 @@ variable.$(OBJEXT): {$(VPATH)}st.h variable.$(OBJEXT): {$(VPATH)}subst.h variable.$(OBJEXT): {$(VPATH)}util.h variable.$(OBJEXT): {$(VPATH)}variable.c -version.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h -version.$(OBJEXT): $(top_srcdir)/include/ruby/version.h +version.$(OBJEXT): $(hdrdir)/ruby/ruby.h +version.$(OBJEXT): $(hdrdir)/ruby/version.h version.$(OBJEXT): $(top_srcdir)/revision.h version.$(OBJEXT): $(top_srcdir)/version.h version.$(OBJEXT): {$(VPATH)}config.h @@ -2276,8 +2278,8 @@ vm.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h vm.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h vm.$(OBJEXT): $(CCAN_DIR)/list/list.h vm.$(OBJEXT): $(CCAN_DIR)/str/str.h +vm.$(OBJEXT): $(hdrdir)/ruby/ruby.h vm.$(OBJEXT): $(top_srcdir)/include/ruby.h -vm.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h vm.$(OBJEXT): {$(VPATH)}config.h vm.$(OBJEXT): {$(VPATH)}constant.h vm.$(OBJEXT): {$(VPATH)}defines.h @@ -2320,8 +2322,8 @@ vm_backtrace.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h vm_backtrace.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h vm_backtrace.$(OBJEXT): $(CCAN_DIR)/list/list.h vm_backtrace.$(OBJEXT): $(CCAN_DIR)/str/str.h +vm_backtrace.$(OBJEXT): $(hdrdir)/ruby/ruby.h vm_backtrace.$(OBJEXT): $(top_srcdir)/include/ruby.h -vm_backtrace.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h vm_backtrace.$(OBJEXT): {$(VPATH)}config.h vm_backtrace.$(OBJEXT): {$(VPATH)}debug.h vm_backtrace.$(OBJEXT): {$(VPATH)}defines.h @@ -2349,8 +2351,8 @@ vm_dump.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h vm_dump.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h vm_dump.$(OBJEXT): $(CCAN_DIR)/list/list.h vm_dump.$(OBJEXT): $(CCAN_DIR)/str/str.h +vm_dump.$(OBJEXT): $(hdrdir)/ruby/ruby.h vm_dump.$(OBJEXT): $(top_srcdir)/include/ruby.h -vm_dump.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h vm_dump.$(OBJEXT): {$(VPATH)}addr2line.h vm_dump.$(OBJEXT): {$(VPATH)}config.h vm_dump.$(OBJEXT): {$(VPATH)}defines.h @@ -2377,8 +2379,8 @@ vm_trace.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h vm_trace.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h vm_trace.$(OBJEXT): $(CCAN_DIR)/list/list.h vm_trace.$(OBJEXT): $(CCAN_DIR)/str/str.h +vm_trace.$(OBJEXT): $(hdrdir)/ruby/ruby.h vm_trace.$(OBJEXT): $(top_srcdir)/include/ruby.h -vm_trace.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h vm_trace.$(OBJEXT): {$(VPATH)}config.h vm_trace.$(OBJEXT): {$(VPATH)}debug.h vm_trace.$(OBJEXT): {$(VPATH)}defines.h @@ -6309,12 +6309,18 @@ for_self_aset(rb_iseq_t *iseq, LINK_ANCHOR *ret, VALUE a) return Qnil; } +/* + * func (index) -> (value) + */ VALUE rb_method_for_self_aref(VALUE name, VALUE arg, rb_insn_func_t func) { return method_for_self(name, arg, func, for_self_aref); } +/* + * func (index, value) -> (index, value) + */ VALUE rb_method_for_self_aset(VALUE name, VALUE arg, rb_insn_func_t func) { diff --git a/configure.in b/configure.in index e132076d65..ae08fa0956 100644 --- a/configure.in +++ b/configure.in @@ -1103,6 +1103,7 @@ main() { test "$target_cpu" = x64 && ac_cv_func___builtin_setjmp=no; } AC_CHECK_TYPE([NET_LUID], [], [], [@%:@include <windows.h> + @%:@include <ifdef.h> @%:@include <iphlpapi.h>]) if test x"$ac_cv_type_NET_LUID" = xyes; then AC_DEFINE(HAVE_TYPE_NET_LUID, 1) @@ -1187,6 +1188,7 @@ AC_CHECK_HEADERS( \ malloc_np.h \ malloc/malloc.h \ setjmpex.h \ + sys/attr.h \ sys/id.h ) @@ -1204,7 +1206,7 @@ AS_IF([test "x$with_gmp" != xno], AC_ARG_WITH([jemalloc], [AS_HELP_STRING([--with-jemalloc],[use jemalloc allocator])], - [with_jemalloc=yes], [with_jemalloc=no]) + [with_jemalloc=$withval], [with_jemalloc=no]) AS_IF([test "x$with_jemalloc" = xyes],[ AC_CHECK_LIB([jemalloc], [malloc_conf], [], [with_jemalloc=no]) AC_CHECK_HEADER(jemalloc/jemalloc.h, [ @@ -1225,7 +1227,6 @@ AS_IF([test "x$with_jemalloc" = xyes],[ AS_IF([test "x$rb_cv_jemalloc_demangle" = xyes], [ AC_DEFINE(JEMALLOC_MANGLE) with_jemalloc=yes - LIBS="-ljemalloc $LIBS" ]) AS_IF([test "x$with_jemalloc" = xyes], [ @@ -2038,6 +2039,7 @@ AC_CHECK_FUNCS(fmod) AC_CHECK_FUNCS(fsync) AC_CHECK_FUNCS(ftruncate) AC_CHECK_FUNCS(ftruncate64) # used for Win32 platform +AC_CHECK_FUNCS(getattrlist) AC_CHECK_FUNCS(getcwd) AC_CHECK_FUNCS(getgidx) AC_CHECK_FUNCS(getgrnam) @@ -3769,6 +3771,9 @@ AS_CASE(["$target_os"], AS_CASE(["$with_gmp: $SOLIBS "], [no:* | *' -lgmp '*|*' $(LIBS) '*], [], [SOLIBS="-lgmp $SOLIBS"]) +AS_CASE(["$with_jemalloc: $LIBS "], [no:* | *' -ljemalloc '*], [], + [LIBS="-ljemalloc $LIBS"]) + MINIOBJS="$MINIDLNOBJ" AS_CASE(["$THREAD_MODEL"], @@ -73,6 +73,16 @@ char *strchr(char*,char); #define opendir(p) rb_w32_uopendir(p) #endif +#ifdef HAVE_SYS_ATTR_H +#include <sys/attr.h> +#endif + +#ifdef HAVE_GETATTRLIST +# define USE_NAME_ON_FS 1 +#else +# define USE_NAME_ON_FS 0 +#endif + #ifdef __APPLE__ # define HAVE_HFS 1 #else @@ -1053,6 +1063,7 @@ sys_warning_1(VALUE mesg) #define GLOB_ALLOC(type) ((type *)malloc(sizeof(type))) #define GLOB_ALLOC_N(type, n) ((type *)malloc(sizeof(type) * (n))) +#define GLOB_REALLOC(ptr, size) realloc((ptr), (size)) #define GLOB_FREE(ptr) free(ptr) #define GLOB_JUMP_TAG(status) (((status) == -1) ? rb_memerror() : rb_jump_tag(status)) @@ -1241,7 +1252,7 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc) else { const char *m = find_dirsep(p, e, flags, enc); const enum glob_pattern_type magic = has_magic(p, m, flags, enc); - const enum glob_pattern_type non_magic = (HAVE_HFS || FNM_SYSCASE) ? PLAIN : ALPHA; + const enum glob_pattern_type non_magic = (USE_NAME_ON_FS || FNM_SYSCASE) ? PLAIN : ALPHA; char *buf; if (!(FNM_SYSCASE || magic > non_magic) && !recursive && *m) { @@ -1315,6 +1326,45 @@ join_path(const char *path, long len, int dirsep, const char *name, size_t namle return buf; } +#ifdef HAVE_GETATTRLIST +static char * +replace_real_basename(char *path, long base, int hfs_p) +{ + u_int32_t attrbuf[(sizeof(attrreference_t) + MAXPATHLEN * 3 + sizeof(u_int32_t) - 1) / sizeof(u_int32_t) + 1]; + struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, ATTR_CMN_NAME}; + const attrreference_t *ar = (void *)(attrbuf+1); + const char *name; + long len; + char *tmp; + IF_HAVE_HFS(VALUE utf8str = Qnil); + + if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW)) + return path; + + name = (char *)ar + ar->attr_dataoffset; + len = (long)ar->attr_length - 1; + if (name + len > (char *)attrbuf + sizeof(attrbuf)) + return path; + +# if HAVE_HFS + if (hfs_p && has_nonascii(name, len)) { + if (!NIL_P(utf8str = rb_str_normalize_ospath(name, len))) { + RSTRING_GETMEM(utf8str, name, len); + } + } +# endif + + tmp = GLOB_REALLOC(path, base + len + 1); + if (tmp) { + path = tmp; + memcpy(path + base, name, len); + path[base + len] = '\0'; + } + IF_HAVE_HFS(if (!NIL_P(utf8str)) rb_str_resize(utf8str, 0)); + return path; +} +#endif + enum answer {UNKNOWN = -1, NO, YES}; #ifndef S_ISDIR @@ -1378,7 +1428,11 @@ glob_helper( plain = 1; break; case ALPHA: +#ifdef HAVE_GETATTRLIST + plain = 1; +#else magical = 1; +#endif break; case MAGICAL: magical = 2; @@ -1601,6 +1655,12 @@ glob_helper( status = -1; break; } +#ifdef HAVE_GETATTRLIST + if ((*cur)->type == ALPHA) { + long base = pathlen + (dirsep != 0); + buf = replace_real_basename(buf, base, IF_HAVE_HFS(1)+0); + } +#endif status = glob_helper(buf, 1, UNKNOWN, UNKNOWN, new_beg, new_end, flags, func, arg, enc); GLOB_FREE(buf); diff --git a/enc/depend b/enc/depend index 9e1b78b79a..9bbbe5c81e 100644 --- a/enc/depend +++ b/enc/depend @@ -169,7 +169,7 @@ enc/cp949.$(OBJEXT): defines.h enc/cp949.$(OBJEXT): enc/cp949.c enc/cp949.$(OBJEXT): missing.h enc/cp949.$(OBJEXT): oniguruma.h -enc/emacs_mule.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/emacs_mule.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/emacs_mule.$(OBJEXT): $(top_srcdir)/regenc.h enc/emacs_mule.$(OBJEXT): $(top_srcdir)/regint.h enc/emacs_mule.$(OBJEXT): config.h @@ -180,8 +180,8 @@ enc/emacs_mule.$(OBJEXT): missing.h enc/emacs_mule.$(OBJEXT): oniguruma.h enc/emacs_mule.$(OBJEXT): st.h enc/emacs_mule.$(OBJEXT): subst.h +enc/encdb.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/encdb.$(OBJEXT): $(top_srcdir)/include/ruby.h -enc/encdb.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h enc/encdb.$(OBJEXT): $(top_srcdir)/internal.h enc/encdb.$(OBJEXT): config.h enc/encdb.$(OBJEXT): defines.h @@ -194,7 +194,7 @@ enc/encdb.$(OBJEXT): missing.h enc/encdb.$(OBJEXT): oniguruma.h enc/encdb.$(OBJEXT): st.h enc/encdb.$(OBJEXT): subst.h -enc/euc_jp.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/euc_jp.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/euc_jp.$(OBJEXT): $(top_srcdir)/regenc.h enc/euc_jp.$(OBJEXT): $(top_srcdir)/regint.h enc/euc_jp.$(OBJEXT): config.h @@ -225,7 +225,7 @@ enc/gb18030.$(OBJEXT): defines.h enc/gb18030.$(OBJEXT): enc/gb18030.c enc/gb18030.$(OBJEXT): missing.h enc/gb18030.$(OBJEXT): oniguruma.h -enc/gb2312.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/gb2312.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/gb2312.$(OBJEXT): $(top_srcdir)/regenc.h enc/gb2312.$(OBJEXT): config.h enc/gb2312.$(OBJEXT): defines.h @@ -344,7 +344,7 @@ enc/koi8_u.$(OBJEXT): defines.h enc/koi8_u.$(OBJEXT): enc/koi8_u.c enc/koi8_u.$(OBJEXT): missing.h enc/koi8_u.$(OBJEXT): oniguruma.h -enc/shift_jis.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/shift_jis.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/shift_jis.$(OBJEXT): $(top_srcdir)/regenc.h enc/shift_jis.$(OBJEXT): $(top_srcdir)/regint.h enc/shift_jis.$(OBJEXT): config.h @@ -357,7 +357,7 @@ enc/shift_jis.$(OBJEXT): missing.h enc/shift_jis.$(OBJEXT): oniguruma.h enc/shift_jis.$(OBJEXT): st.h enc/shift_jis.$(OBJEXT): subst.h -enc/trans/big5.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/big5.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/big5.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/big5.$(OBJEXT): config.h enc/trans/big5.$(OBJEXT): defines.h @@ -366,7 +366,7 @@ enc/trans/big5.$(OBJEXT): intern.h enc/trans/big5.$(OBJEXT): missing.h enc/trans/big5.$(OBJEXT): st.h enc/trans/big5.$(OBJEXT): subst.h -enc/trans/chinese.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/chinese.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/chinese.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/chinese.$(OBJEXT): config.h enc/trans/chinese.$(OBJEXT): defines.h @@ -375,7 +375,7 @@ enc/trans/chinese.$(OBJEXT): intern.h enc/trans/chinese.$(OBJEXT): missing.h enc/trans/chinese.$(OBJEXT): st.h enc/trans/chinese.$(OBJEXT): subst.h -enc/trans/emoji.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/emoji.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/emoji.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/emoji.$(OBJEXT): config.h enc/trans/emoji.$(OBJEXT): defines.h @@ -384,7 +384,7 @@ enc/trans/emoji.$(OBJEXT): intern.h enc/trans/emoji.$(OBJEXT): missing.h enc/trans/emoji.$(OBJEXT): st.h enc/trans/emoji.$(OBJEXT): subst.h -enc/trans/emoji_iso2022_kddi.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/emoji_iso2022_kddi.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/emoji_iso2022_kddi.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/emoji_iso2022_kddi.$(OBJEXT): config.h enc/trans/emoji_iso2022_kddi.$(OBJEXT): defines.h @@ -393,7 +393,7 @@ enc/trans/emoji_iso2022_kddi.$(OBJEXT): intern.h enc/trans/emoji_iso2022_kddi.$(OBJEXT): missing.h enc/trans/emoji_iso2022_kddi.$(OBJEXT): st.h enc/trans/emoji_iso2022_kddi.$(OBJEXT): subst.h -enc/trans/emoji_sjis_docomo.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/emoji_sjis_docomo.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/emoji_sjis_docomo.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/emoji_sjis_docomo.$(OBJEXT): config.h enc/trans/emoji_sjis_docomo.$(OBJEXT): defines.h @@ -402,7 +402,7 @@ enc/trans/emoji_sjis_docomo.$(OBJEXT): intern.h enc/trans/emoji_sjis_docomo.$(OBJEXT): missing.h enc/trans/emoji_sjis_docomo.$(OBJEXT): st.h enc/trans/emoji_sjis_docomo.$(OBJEXT): subst.h -enc/trans/emoji_sjis_kddi.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/emoji_sjis_kddi.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/emoji_sjis_kddi.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/emoji_sjis_kddi.$(OBJEXT): config.h enc/trans/emoji_sjis_kddi.$(OBJEXT): defines.h @@ -411,7 +411,7 @@ enc/trans/emoji_sjis_kddi.$(OBJEXT): intern.h enc/trans/emoji_sjis_kddi.$(OBJEXT): missing.h enc/trans/emoji_sjis_kddi.$(OBJEXT): st.h enc/trans/emoji_sjis_kddi.$(OBJEXT): subst.h -enc/trans/emoji_sjis_softbank.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/emoji_sjis_softbank.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/emoji_sjis_softbank.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/emoji_sjis_softbank.$(OBJEXT): config.h enc/trans/emoji_sjis_softbank.$(OBJEXT): defines.h @@ -420,7 +420,7 @@ enc/trans/emoji_sjis_softbank.$(OBJEXT): intern.h enc/trans/emoji_sjis_softbank.$(OBJEXT): missing.h enc/trans/emoji_sjis_softbank.$(OBJEXT): st.h enc/trans/emoji_sjis_softbank.$(OBJEXT): subst.h -enc/trans/escape.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/escape.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/escape.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/escape.$(OBJEXT): config.h enc/trans/escape.$(OBJEXT): defines.h @@ -429,7 +429,7 @@ enc/trans/escape.$(OBJEXT): intern.h enc/trans/escape.$(OBJEXT): missing.h enc/trans/escape.$(OBJEXT): st.h enc/trans/escape.$(OBJEXT): subst.h -enc/trans/gb18030.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/gb18030.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/gb18030.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/gb18030.$(OBJEXT): config.h enc/trans/gb18030.$(OBJEXT): defines.h @@ -438,7 +438,7 @@ enc/trans/gb18030.$(OBJEXT): intern.h enc/trans/gb18030.$(OBJEXT): missing.h enc/trans/gb18030.$(OBJEXT): st.h enc/trans/gb18030.$(OBJEXT): subst.h -enc/trans/gbk.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/gbk.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/gbk.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/gbk.$(OBJEXT): config.h enc/trans/gbk.$(OBJEXT): defines.h @@ -447,7 +447,7 @@ enc/trans/gbk.$(OBJEXT): intern.h enc/trans/gbk.$(OBJEXT): missing.h enc/trans/gbk.$(OBJEXT): st.h enc/trans/gbk.$(OBJEXT): subst.h -enc/trans/iso2022.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/iso2022.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/iso2022.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/iso2022.$(OBJEXT): config.h enc/trans/iso2022.$(OBJEXT): defines.h @@ -456,7 +456,7 @@ enc/trans/iso2022.$(OBJEXT): intern.h enc/trans/iso2022.$(OBJEXT): missing.h enc/trans/iso2022.$(OBJEXT): st.h enc/trans/iso2022.$(OBJEXT): subst.h -enc/trans/japanese.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/japanese.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/japanese.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/japanese.$(OBJEXT): config.h enc/trans/japanese.$(OBJEXT): defines.h @@ -465,7 +465,7 @@ enc/trans/japanese.$(OBJEXT): intern.h enc/trans/japanese.$(OBJEXT): missing.h enc/trans/japanese.$(OBJEXT): st.h enc/trans/japanese.$(OBJEXT): subst.h -enc/trans/japanese_euc.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/japanese_euc.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/japanese_euc.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/japanese_euc.$(OBJEXT): config.h enc/trans/japanese_euc.$(OBJEXT): defines.h @@ -474,7 +474,7 @@ enc/trans/japanese_euc.$(OBJEXT): intern.h enc/trans/japanese_euc.$(OBJEXT): missing.h enc/trans/japanese_euc.$(OBJEXT): st.h enc/trans/japanese_euc.$(OBJEXT): subst.h -enc/trans/japanese_sjis.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/japanese_sjis.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/japanese_sjis.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/japanese_sjis.$(OBJEXT): config.h enc/trans/japanese_sjis.$(OBJEXT): defines.h @@ -483,7 +483,7 @@ enc/trans/japanese_sjis.$(OBJEXT): intern.h enc/trans/japanese_sjis.$(OBJEXT): missing.h enc/trans/japanese_sjis.$(OBJEXT): st.h enc/trans/japanese_sjis.$(OBJEXT): subst.h -enc/trans/korean.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/korean.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/korean.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/korean.$(OBJEXT): config.h enc/trans/korean.$(OBJEXT): defines.h @@ -492,7 +492,7 @@ enc/trans/korean.$(OBJEXT): intern.h enc/trans/korean.$(OBJEXT): missing.h enc/trans/korean.$(OBJEXT): st.h enc/trans/korean.$(OBJEXT): subst.h -enc/trans/single_byte.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/single_byte.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/single_byte.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/single_byte.$(OBJEXT): config.h enc/trans/single_byte.$(OBJEXT): defines.h @@ -503,7 +503,7 @@ enc/trans/single_byte.$(OBJEXT): st.h enc/trans/single_byte.$(OBJEXT): subst.h enc/trans/transdb.$(OBJEXT): enc/trans/transdb.c enc/trans/transdb.$(OBJEXT): transdb.h -enc/trans/utf8_mac.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/utf8_mac.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/utf8_mac.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/utf8_mac.$(OBJEXT): config.h enc/trans/utf8_mac.$(OBJEXT): defines.h @@ -512,7 +512,7 @@ enc/trans/utf8_mac.$(OBJEXT): intern.h enc/trans/utf8_mac.$(OBJEXT): missing.h enc/trans/utf8_mac.$(OBJEXT): st.h enc/trans/utf8_mac.$(OBJEXT): subst.h -enc/trans/utf_16_32.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/trans/utf_16_32.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/utf_16_32.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/utf_16_32.$(OBJEXT): config.h enc/trans/utf_16_32.$(OBJEXT): defines.h @@ -551,7 +551,7 @@ enc/windows_1251.$(OBJEXT): defines.h enc/windows_1251.$(OBJEXT): enc/windows_1251.c enc/windows_1251.$(OBJEXT): missing.h enc/windows_1251.$(OBJEXT): oniguruma.h -enc/windows_31j.$(OBJEXT): $(top_srcdir)/include/ruby/ruby.h +enc/windows_31j.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/windows_31j.$(OBJEXT): $(top_srcdir)/regenc.h enc/windows_31j.$(OBJEXT): $(top_srcdir)/regint.h enc/windows_31j.$(OBJEXT): config.h @@ -541,8 +541,10 @@ rb_check_type(VALUE x, int t) int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent) { - rb_warn("rb_typeddata_inherited_p() is deprecated"); - if (child == parent) return 1; + while (child) { + if (child == parent) return 1; + child = child->parent; + } return 0; } @@ -550,7 +552,7 @@ int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type) { if (!RB_TYPE_P(obj, T_DATA) || - !RTYPEDDATA_P(obj) || RTYPEDDATA_TYPE(obj) != data_type) { + !RTYPEDDATA_P(obj) || !rb_typeddata_inherited_p(RTYPEDDATA_TYPE(obj), data_type)) { return 0; } return 1; @@ -570,7 +572,7 @@ rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type) etype = rb_obj_classname(obj); rb_raise(rb_eTypeError, mesg, etype, data_type->wrap_struct_name); } - else if (RTYPEDDATA_TYPE(obj) != data_type) { + else if (!rb_typeddata_inherited_p(RTYPEDDATA_TYPE(obj), data_type)) { etype = RTYPEDDATA_TYPE(obj)->wrap_struct_name; rb_raise(rb_eTypeError, mesg, etype, data_type->wrap_struct_name); } diff --git a/ext/-test-/bignum/depend b/ext/-test-/bignum/depend index 85fe873853..26cb890dbf 100644 --- a/ext/-test-/bignum/depend +++ b/ext/-test-/bignum/depend @@ -13,10 +13,10 @@ big2str.o: $(hdrdir)/ruby/intern.h big2str.o: $(hdrdir)/ruby/io.h big2str.o: $(hdrdir)/ruby/missing.h big2str.o: $(hdrdir)/ruby/oniguruma.h +big2str.o: $(hdrdir)/ruby/ruby.h big2str.o: $(hdrdir)/ruby/st.h big2str.o: $(hdrdir)/ruby/subst.h big2str.o: $(top_srcdir)/include/ruby.h -big2str.o: $(top_srcdir)/include/ruby/ruby.h big2str.o: $(top_srcdir)/internal.h big2str.o: big2str.c bigzero.o: $(RUBY_EXTCONF_H) @@ -27,10 +27,10 @@ bigzero.o: $(hdrdir)/ruby/intern.h bigzero.o: $(hdrdir)/ruby/io.h bigzero.o: $(hdrdir)/ruby/missing.h bigzero.o: $(hdrdir)/ruby/oniguruma.h +bigzero.o: $(hdrdir)/ruby/ruby.h bigzero.o: $(hdrdir)/ruby/st.h bigzero.o: $(hdrdir)/ruby/subst.h bigzero.o: $(top_srcdir)/include/ruby.h -bigzero.o: $(top_srcdir)/include/ruby/ruby.h bigzero.o: $(top_srcdir)/internal.h bigzero.o: bigzero.c div.o: $(RUBY_EXTCONF_H) @@ -41,10 +41,10 @@ div.o: $(hdrdir)/ruby/intern.h div.o: $(hdrdir)/ruby/io.h div.o: $(hdrdir)/ruby/missing.h div.o: $(hdrdir)/ruby/oniguruma.h +div.o: $(hdrdir)/ruby/ruby.h div.o: $(hdrdir)/ruby/st.h div.o: $(hdrdir)/ruby/subst.h div.o: $(top_srcdir)/include/ruby.h -div.o: $(top_srcdir)/include/ruby/ruby.h div.o: $(top_srcdir)/internal.h div.o: div.c init.o: $(RUBY_EXTCONF_H) @@ -52,10 +52,10 @@ init.o: $(arch_hdrdir)/ruby/config.h init.o: $(hdrdir)/ruby/defines.h init.o: $(hdrdir)/ruby/intern.h init.o: $(hdrdir)/ruby/missing.h +init.o: $(hdrdir)/ruby/ruby.h init.o: $(hdrdir)/ruby/st.h init.o: $(hdrdir)/ruby/subst.h init.o: $(top_srcdir)/include/ruby.h -init.o: $(top_srcdir)/include/ruby/ruby.h init.o: init.c intpack.o: $(RUBY_EXTCONF_H) intpack.o: $(arch_hdrdir)/ruby/config.h @@ -65,10 +65,10 @@ intpack.o: $(hdrdir)/ruby/intern.h intpack.o: $(hdrdir)/ruby/io.h intpack.o: $(hdrdir)/ruby/missing.h intpack.o: $(hdrdir)/ruby/oniguruma.h +intpack.o: $(hdrdir)/ruby/ruby.h intpack.o: $(hdrdir)/ruby/st.h intpack.o: $(hdrdir)/ruby/subst.h intpack.o: $(top_srcdir)/include/ruby.h -intpack.o: $(top_srcdir)/include/ruby/ruby.h intpack.o: $(top_srcdir)/internal.h intpack.o: intpack.c mul.o: $(RUBY_EXTCONF_H) @@ -79,10 +79,10 @@ mul.o: $(hdrdir)/ruby/intern.h mul.o: $(hdrdir)/ruby/io.h mul.o: $(hdrdir)/ruby/missing.h mul.o: $(hdrdir)/ruby/oniguruma.h +mul.o: $(hdrdir)/ruby/ruby.h mul.o: $(hdrdir)/ruby/st.h mul.o: $(hdrdir)/ruby/subst.h mul.o: $(top_srcdir)/include/ruby.h -mul.o: $(top_srcdir)/include/ruby/ruby.h mul.o: $(top_srcdir)/internal.h mul.o: mul.c str2big.o: $(RUBY_EXTCONF_H) @@ -93,10 +93,10 @@ str2big.o: $(hdrdir)/ruby/intern.h str2big.o: $(hdrdir)/ruby/io.h str2big.o: $(hdrdir)/ruby/missing.h str2big.o: $(hdrdir)/ruby/oniguruma.h +str2big.o: $(hdrdir)/ruby/ruby.h str2big.o: $(hdrdir)/ruby/st.h str2big.o: $(hdrdir)/ruby/subst.h str2big.o: $(top_srcdir)/include/ruby.h -str2big.o: $(top_srcdir)/include/ruby/ruby.h str2big.o: $(top_srcdir)/internal.h str2big.o: str2big.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/-test-/debug/depend b/ext/-test-/debug/depend index 819d742ed0..5178d85673 100644 --- a/ext/-test-/debug/depend +++ b/ext/-test-/debug/depend @@ -4,10 +4,10 @@ init.o: $(arch_hdrdir)/ruby/config.h init.o: $(hdrdir)/ruby/defines.h init.o: $(hdrdir)/ruby/intern.h init.o: $(hdrdir)/ruby/missing.h +init.o: $(hdrdir)/ruby/ruby.h init.o: $(hdrdir)/ruby/st.h init.o: $(hdrdir)/ruby/subst.h init.o: $(top_srcdir)/include/ruby.h -init.o: $(top_srcdir)/include/ruby/ruby.h init.o: init.c inspector.o: $(RUBY_EXTCONF_H) inspector.o: $(arch_hdrdir)/ruby/config.h @@ -15,9 +15,9 @@ inspector.o: $(hdrdir)/ruby/debug.h inspector.o: $(hdrdir)/ruby/defines.h inspector.o: $(hdrdir)/ruby/intern.h inspector.o: $(hdrdir)/ruby/missing.h +inspector.o: $(hdrdir)/ruby/ruby.h inspector.o: $(hdrdir)/ruby/st.h inspector.o: $(hdrdir)/ruby/subst.h -inspector.o: $(top_srcdir)/include/ruby/ruby.h inspector.o: inspector.c profile_frames.o: $(RUBY_EXTCONF_H) profile_frames.o: $(arch_hdrdir)/ruby/config.h @@ -25,8 +25,8 @@ profile_frames.o: $(hdrdir)/ruby/debug.h profile_frames.o: $(hdrdir)/ruby/defines.h profile_frames.o: $(hdrdir)/ruby/intern.h profile_frames.o: $(hdrdir)/ruby/missing.h +profile_frames.o: $(hdrdir)/ruby/ruby.h profile_frames.o: $(hdrdir)/ruby/st.h profile_frames.o: $(hdrdir)/ruby/subst.h -profile_frames.o: $(top_srcdir)/include/ruby/ruby.h profile_frames.o: profile_frames.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/-test-/exception/depend b/ext/-test-/exception/depend index c1bde255d9..a89ecf7a4f 100644 --- a/ext/-test-/exception/depend +++ b/ext/-test-/exception/depend @@ -4,9 +4,9 @@ dataerror.o: $(arch_hdrdir)/ruby/config.h dataerror.o: $(hdrdir)/ruby/defines.h dataerror.o: $(hdrdir)/ruby/intern.h dataerror.o: $(hdrdir)/ruby/missing.h +dataerror.o: $(hdrdir)/ruby/ruby.h dataerror.o: $(hdrdir)/ruby/st.h dataerror.o: $(hdrdir)/ruby/subst.h -dataerror.o: $(top_srcdir)/include/ruby/ruby.h dataerror.o: dataerror.c enc_raise.o: $(RUBY_EXTCONF_H) enc_raise.o: $(arch_hdrdir)/ruby/config.h @@ -15,29 +15,29 @@ enc_raise.o: $(hdrdir)/ruby/encoding.h enc_raise.o: $(hdrdir)/ruby/intern.h enc_raise.o: $(hdrdir)/ruby/missing.h enc_raise.o: $(hdrdir)/ruby/oniguruma.h +enc_raise.o: $(hdrdir)/ruby/ruby.h enc_raise.o: $(hdrdir)/ruby/st.h enc_raise.o: $(hdrdir)/ruby/subst.h enc_raise.o: $(top_srcdir)/include/ruby.h -enc_raise.o: $(top_srcdir)/include/ruby/ruby.h enc_raise.o: enc_raise.c ensured.o: $(RUBY_EXTCONF_H) ensured.o: $(arch_hdrdir)/ruby/config.h ensured.o: $(hdrdir)/ruby/defines.h ensured.o: $(hdrdir)/ruby/intern.h ensured.o: $(hdrdir)/ruby/missing.h +ensured.o: $(hdrdir)/ruby/ruby.h ensured.o: $(hdrdir)/ruby/st.h ensured.o: $(hdrdir)/ruby/subst.h ensured.o: $(top_srcdir)/include/ruby.h -ensured.o: $(top_srcdir)/include/ruby/ruby.h ensured.o: ensured.c init.o: $(RUBY_EXTCONF_H) init.o: $(arch_hdrdir)/ruby/config.h init.o: $(hdrdir)/ruby/defines.h init.o: $(hdrdir)/ruby/intern.h init.o: $(hdrdir)/ruby/missing.h +init.o: $(hdrdir)/ruby/ruby.h init.o: $(hdrdir)/ruby/st.h init.o: $(hdrdir)/ruby/subst.h init.o: $(top_srcdir)/include/ruby.h -init.o: $(top_srcdir)/include/ruby/ruby.h init.o: init.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/-test-/file/depend b/ext/-test-/file/depend index 17f4e0adba..a43b4275dc 100644 --- a/ext/-test-/file/depend +++ b/ext/-test-/file/depend @@ -7,19 +7,19 @@ fs.o: $(hdrdir)/ruby/intern.h fs.o: $(hdrdir)/ruby/io.h fs.o: $(hdrdir)/ruby/missing.h fs.o: $(hdrdir)/ruby/oniguruma.h +fs.o: $(hdrdir)/ruby/ruby.h fs.o: $(hdrdir)/ruby/st.h fs.o: $(hdrdir)/ruby/subst.h -fs.o: $(top_srcdir)/include/ruby/ruby.h fs.o: fs.c init.o: $(RUBY_EXTCONF_H) init.o: $(arch_hdrdir)/ruby/config.h init.o: $(hdrdir)/ruby/defines.h init.o: $(hdrdir)/ruby/intern.h init.o: $(hdrdir)/ruby/missing.h +init.o: $(hdrdir)/ruby/ruby.h init.o: $(hdrdir)/ruby/st.h init.o: $(hdrdir)/ruby/subst.h init.o: $(top_srcdir)/include/ruby.h -init.o: $(top_srcdir)/include/ruby/ruby.h init.o: init.c stat.o: $(RUBY_EXTCONF_H) stat.o: $(arch_hdrdir)/ruby/config.h @@ -29,8 +29,8 @@ stat.o: $(hdrdir)/ruby/intern.h stat.o: $(hdrdir)/ruby/io.h stat.o: $(hdrdir)/ruby/missing.h stat.o: $(hdrdir)/ruby/oniguruma.h +stat.o: $(hdrdir)/ruby/ruby.h stat.o: $(hdrdir)/ruby/st.h stat.o: $(hdrdir)/ruby/subst.h -stat.o: $(top_srcdir)/include/ruby/ruby.h stat.o: stat.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/-test-/hash/delete.c b/ext/-test-/hash/delete.c index c0489e0ab7..10d4aec6e7 100644 --- a/ext/-test-/hash/delete.c +++ b/ext/-test-/hash/delete.c @@ -1,9 +1,11 @@ #include "ruby.h" +extern VALUE rb_hash_delete_entry(VALUE hash, VALUE key); + static VALUE hash_delete(VALUE hash, VALUE key) { - VALUE ret = rb_hash_delete(hash, key); + VALUE ret = rb_hash_delete_entry(hash, key); return ret == Qundef ? Qnil : rb_ary_new_from_values(1, &ret); } diff --git a/ext/-test-/rational/depend b/ext/-test-/rational/depend index b2dcf0a311..bff4981ed6 100644 --- a/ext/-test-/rational/depend +++ b/ext/-test-/rational/depend @@ -11,10 +11,10 @@ rat.o: $(hdrdir)/ruby/intern.h rat.o: $(hdrdir)/ruby/io.h rat.o: $(hdrdir)/ruby/missing.h rat.o: $(hdrdir)/ruby/oniguruma.h +rat.o: $(hdrdir)/ruby/ruby.h rat.o: $(hdrdir)/ruby/st.h rat.o: $(hdrdir)/ruby/subst.h rat.o: $(top_srcdir)/include/ruby.h -rat.o: $(top_srcdir)/include/ruby/ruby.h rat.o: $(top_srcdir)/internal.h rat.o: rat.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/-test-/string/depend b/ext/-test-/string/depend index fc61f8a0af..ef13e44df5 100644 --- a/ext/-test-/string/depend +++ b/ext/-test-/string/depend @@ -6,9 +6,9 @@ coderange.o: $(hdrdir)/ruby/encoding.h coderange.o: $(hdrdir)/ruby/intern.h coderange.o: $(hdrdir)/ruby/missing.h coderange.o: $(hdrdir)/ruby/oniguruma.h +coderange.o: $(hdrdir)/ruby/ruby.h coderange.o: $(hdrdir)/ruby/st.h coderange.o: $(hdrdir)/ruby/subst.h -coderange.o: $(top_srcdir)/include/ruby/ruby.h coderange.o: coderange.c cstr.o: $(RUBY_EXTCONF_H) cstr.o: $(arch_hdrdir)/ruby/config.h @@ -17,20 +17,20 @@ cstr.o: $(hdrdir)/ruby/encoding.h cstr.o: $(hdrdir)/ruby/intern.h cstr.o: $(hdrdir)/ruby/missing.h cstr.o: $(hdrdir)/ruby/oniguruma.h +cstr.o: $(hdrdir)/ruby/ruby.h cstr.o: $(hdrdir)/ruby/st.h cstr.o: $(hdrdir)/ruby/subst.h cstr.o: $(top_srcdir)/include/ruby.h -cstr.o: $(top_srcdir)/include/ruby/ruby.h cstr.o: cstr.c ellipsize.o: $(RUBY_EXTCONF_H) ellipsize.o: $(arch_hdrdir)/ruby/config.h ellipsize.o: $(hdrdir)/ruby/defines.h ellipsize.o: $(hdrdir)/ruby/intern.h ellipsize.o: $(hdrdir)/ruby/missing.h +ellipsize.o: $(hdrdir)/ruby/ruby.h ellipsize.o: $(hdrdir)/ruby/st.h ellipsize.o: $(hdrdir)/ruby/subst.h ellipsize.o: $(top_srcdir)/include/ruby.h -ellipsize.o: $(top_srcdir)/include/ruby/ruby.h ellipsize.o: ellipsize.c enc_associate.o: $(RUBY_EXTCONF_H) enc_associate.o: $(arch_hdrdir)/ruby/config.h @@ -39,10 +39,10 @@ enc_associate.o: $(hdrdir)/ruby/encoding.h enc_associate.o: $(hdrdir)/ruby/intern.h enc_associate.o: $(hdrdir)/ruby/missing.h enc_associate.o: $(hdrdir)/ruby/oniguruma.h +enc_associate.o: $(hdrdir)/ruby/ruby.h enc_associate.o: $(hdrdir)/ruby/st.h enc_associate.o: $(hdrdir)/ruby/subst.h enc_associate.o: $(top_srcdir)/include/ruby.h -enc_associate.o: $(top_srcdir)/include/ruby/ruby.h enc_associate.o: enc_associate.c enc_str_buf_cat.o: $(RUBY_EXTCONF_H) enc_str_buf_cat.o: $(arch_hdrdir)/ruby/config.h @@ -51,29 +51,29 @@ enc_str_buf_cat.o: $(hdrdir)/ruby/encoding.h enc_str_buf_cat.o: $(hdrdir)/ruby/intern.h enc_str_buf_cat.o: $(hdrdir)/ruby/missing.h enc_str_buf_cat.o: $(hdrdir)/ruby/oniguruma.h +enc_str_buf_cat.o: $(hdrdir)/ruby/ruby.h enc_str_buf_cat.o: $(hdrdir)/ruby/st.h enc_str_buf_cat.o: $(hdrdir)/ruby/subst.h -enc_str_buf_cat.o: $(top_srcdir)/include/ruby/ruby.h enc_str_buf_cat.o: enc_str_buf_cat.c init.o: $(RUBY_EXTCONF_H) init.o: $(arch_hdrdir)/ruby/config.h init.o: $(hdrdir)/ruby/defines.h init.o: $(hdrdir)/ruby/intern.h init.o: $(hdrdir)/ruby/missing.h +init.o: $(hdrdir)/ruby/ruby.h init.o: $(hdrdir)/ruby/st.h init.o: $(hdrdir)/ruby/subst.h init.o: $(top_srcdir)/include/ruby.h -init.o: $(top_srcdir)/include/ruby/ruby.h init.o: init.c modify.o: $(RUBY_EXTCONF_H) modify.o: $(arch_hdrdir)/ruby/config.h modify.o: $(hdrdir)/ruby/defines.h modify.o: $(hdrdir)/ruby/intern.h modify.o: $(hdrdir)/ruby/missing.h +modify.o: $(hdrdir)/ruby/ruby.h modify.o: $(hdrdir)/ruby/st.h modify.o: $(hdrdir)/ruby/subst.h modify.o: $(top_srcdir)/include/ruby.h -modify.o: $(top_srcdir)/include/ruby/ruby.h modify.o: modify.c normalize.o: $(RUBY_EXTCONF_H) normalize.o: $(arch_hdrdir)/ruby/config.h @@ -83,10 +83,10 @@ normalize.o: $(hdrdir)/ruby/intern.h normalize.o: $(hdrdir)/ruby/io.h normalize.o: $(hdrdir)/ruby/missing.h normalize.o: $(hdrdir)/ruby/oniguruma.h +normalize.o: $(hdrdir)/ruby/ruby.h normalize.o: $(hdrdir)/ruby/st.h normalize.o: $(hdrdir)/ruby/subst.h normalize.o: $(top_srcdir)/include/ruby.h -normalize.o: $(top_srcdir)/include/ruby/ruby.h normalize.o: $(top_srcdir)/internal.h normalize.o: normalize.c qsort.o: $(RUBY_EXTCONF_H) @@ -96,20 +96,20 @@ qsort.o: $(hdrdir)/ruby/encoding.h qsort.o: $(hdrdir)/ruby/intern.h qsort.o: $(hdrdir)/ruby/missing.h qsort.o: $(hdrdir)/ruby/oniguruma.h +qsort.o: $(hdrdir)/ruby/ruby.h qsort.o: $(hdrdir)/ruby/st.h qsort.o: $(hdrdir)/ruby/subst.h qsort.o: $(hdrdir)/ruby/util.h qsort.o: $(top_srcdir)/include/ruby.h -qsort.o: $(top_srcdir)/include/ruby/ruby.h qsort.o: qsort.c set_len.o: $(RUBY_EXTCONF_H) set_len.o: $(arch_hdrdir)/ruby/config.h set_len.o: $(hdrdir)/ruby/defines.h set_len.o: $(hdrdir)/ruby/intern.h set_len.o: $(hdrdir)/ruby/missing.h +set_len.o: $(hdrdir)/ruby/ruby.h set_len.o: $(hdrdir)/ruby/st.h set_len.o: $(hdrdir)/ruby/subst.h set_len.o: $(top_srcdir)/include/ruby.h -set_len.o: $(top_srcdir)/include/ruby/ruby.h set_len.o: set_len.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/-test-/tracepoint/depend b/ext/-test-/tracepoint/depend index 9eceaf2c5f..741bad0386 100644 --- a/ext/-test-/tracepoint/depend +++ b/ext/-test-/tracepoint/depend @@ -5,9 +5,9 @@ gc_hook.o: $(hdrdir)/ruby/debug.h gc_hook.o: $(hdrdir)/ruby/defines.h gc_hook.o: $(hdrdir)/ruby/intern.h gc_hook.o: $(hdrdir)/ruby/missing.h +gc_hook.o: $(hdrdir)/ruby/ruby.h gc_hook.o: $(hdrdir)/ruby/st.h gc_hook.o: $(hdrdir)/ruby/subst.h -gc_hook.o: $(top_srcdir)/include/ruby/ruby.h gc_hook.o: gc_hook.c tracepoint.o: $(RUBY_EXTCONF_H) tracepoint.o: $(arch_hdrdir)/ruby/config.h @@ -15,8 +15,8 @@ tracepoint.o: $(hdrdir)/ruby/debug.h tracepoint.o: $(hdrdir)/ruby/defines.h tracepoint.o: $(hdrdir)/ruby/intern.h tracepoint.o: $(hdrdir)/ruby/missing.h +tracepoint.o: $(hdrdir)/ruby/ruby.h tracepoint.o: $(hdrdir)/ruby/st.h tracepoint.o: $(hdrdir)/ruby/subst.h -tracepoint.o: $(top_srcdir)/include/ruby/ruby.h tracepoint.o: tracepoint.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/-test-/wait_for_single_fd/depend b/ext/-test-/wait_for_single_fd/depend index 2d90fdc18f..fddd41053f 100644 --- a/ext/-test-/wait_for_single_fd/depend +++ b/ext/-test-/wait_for_single_fd/depend @@ -7,8 +7,8 @@ wait_for_single_fd.o: $(hdrdir)/ruby/intern.h wait_for_single_fd.o: $(hdrdir)/ruby/io.h wait_for_single_fd.o: $(hdrdir)/ruby/missing.h wait_for_single_fd.o: $(hdrdir)/ruby/oniguruma.h +wait_for_single_fd.o: $(hdrdir)/ruby/ruby.h wait_for_single_fd.o: $(hdrdir)/ruby/st.h wait_for_single_fd.o: $(hdrdir)/ruby/subst.h -wait_for_single_fd.o: $(top_srcdir)/include/ruby/ruby.h wait_for_single_fd.o: wait_for_single_fd.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/coverage/depend b/ext/coverage/depend index 5325b50d0f..04eaf10d0a 100644 --- a/ext/coverage/depend +++ b/ext/coverage/depend @@ -19,6 +19,7 @@ coverage.o: $(hdrdir)/ruby/intern.h coverage.o: $(hdrdir)/ruby/io.h coverage.o: $(hdrdir)/ruby/missing.h coverage.o: $(hdrdir)/ruby/oniguruma.h +coverage.o: $(hdrdir)/ruby/ruby.h coverage.o: $(hdrdir)/ruby/st.h coverage.o: $(hdrdir)/ruby/subst.h coverage.o: $(hdrdir)/ruby/thread_native.h @@ -27,7 +28,6 @@ coverage.o: $(top_srcdir)/ccan/container_of/container_of.h coverage.o: $(top_srcdir)/ccan/list/list.h coverage.o: $(top_srcdir)/ccan/str/str.h coverage.o: $(top_srcdir)/include/ruby.h -coverage.o: $(top_srcdir)/include/ruby/ruby.h coverage.o: $(top_srcdir)/internal.h coverage.o: $(top_srcdir)/method.h coverage.o: $(top_srcdir)/node.h diff --git a/ext/date/depend b/ext/date/depend index 6c00409e88..a5444e3ed9 100644 --- a/ext/date/depend +++ b/ext/date/depend @@ -6,10 +6,10 @@ date_core.o: $(hdrdir)/ruby/encoding.h date_core.o: $(hdrdir)/ruby/intern.h date_core.o: $(hdrdir)/ruby/missing.h date_core.o: $(hdrdir)/ruby/oniguruma.h +date_core.o: $(hdrdir)/ruby/ruby.h date_core.o: $(hdrdir)/ruby/st.h date_core.o: $(hdrdir)/ruby/subst.h date_core.o: $(top_srcdir)/include/ruby.h -date_core.o: $(top_srcdir)/include/ruby/ruby.h date_core.o: date_core.c date_core.o: date_tmx.h date_parse.o: $(RUBY_EXTCONF_H) @@ -21,19 +21,19 @@ date_parse.o: $(hdrdir)/ruby/missing.h date_parse.o: $(hdrdir)/ruby/oniguruma.h date_parse.o: $(hdrdir)/ruby/re.h date_parse.o: $(hdrdir)/ruby/regex.h +date_parse.o: $(hdrdir)/ruby/ruby.h date_parse.o: $(hdrdir)/ruby/st.h date_parse.o: $(hdrdir)/ruby/subst.h date_parse.o: $(top_srcdir)/include/ruby.h -date_parse.o: $(top_srcdir)/include/ruby/ruby.h date_parse.o: date_parse.c date_strftime.o: $(RUBY_EXTCONF_H) date_strftime.o: $(arch_hdrdir)/ruby/config.h date_strftime.o: $(hdrdir)/ruby/defines.h date_strftime.o: $(hdrdir)/ruby/intern.h date_strftime.o: $(hdrdir)/ruby/missing.h +date_strftime.o: $(hdrdir)/ruby/ruby.h date_strftime.o: $(hdrdir)/ruby/st.h date_strftime.o: $(hdrdir)/ruby/subst.h -date_strftime.o: $(top_srcdir)/include/ruby/ruby.h date_strftime.o: date_strftime.c date_strftime.o: date_tmx.h date_strptime.o: $(RUBY_EXTCONF_H) @@ -45,9 +45,9 @@ date_strptime.o: $(hdrdir)/ruby/missing.h date_strptime.o: $(hdrdir)/ruby/oniguruma.h date_strptime.o: $(hdrdir)/ruby/re.h date_strptime.o: $(hdrdir)/ruby/regex.h +date_strptime.o: $(hdrdir)/ruby/ruby.h date_strptime.o: $(hdrdir)/ruby/st.h date_strptime.o: $(hdrdir)/ruby/subst.h date_strptime.o: $(top_srcdir)/include/ruby.h -date_strptime.o: $(top_srcdir)/include/ruby/ruby.h date_strptime.o: date_strptime.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/digest/bubblebabble/depend b/ext/digest/bubblebabble/depend index c255cd2ba0..59c6d0ce74 100644 --- a/ext/digest/bubblebabble/depend +++ b/ext/digest/bubblebabble/depend @@ -4,10 +4,10 @@ bubblebabble.o: $(arch_hdrdir)/ruby/config.h bubblebabble.o: $(hdrdir)/ruby/defines.h bubblebabble.o: $(hdrdir)/ruby/intern.h bubblebabble.o: $(hdrdir)/ruby/missing.h +bubblebabble.o: $(hdrdir)/ruby/ruby.h bubblebabble.o: $(hdrdir)/ruby/st.h bubblebabble.o: $(hdrdir)/ruby/subst.h bubblebabble.o: $(top_srcdir)/ext/digest/digest.h bubblebabble.o: $(top_srcdir)/include/ruby.h -bubblebabble.o: $(top_srcdir)/include/ruby/ruby.h bubblebabble.o: bubblebabble.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/digest/depend b/ext/digest/depend index 3bb2f457b3..dbc2bba3cc 100644 --- a/ext/digest/depend +++ b/ext/digest/depend @@ -4,10 +4,10 @@ digest.o: $(arch_hdrdir)/ruby/config.h digest.o: $(hdrdir)/ruby/defines.h digest.o: $(hdrdir)/ruby/intern.h digest.o: $(hdrdir)/ruby/missing.h +digest.o: $(hdrdir)/ruby/ruby.h digest.o: $(hdrdir)/ruby/st.h digest.o: $(hdrdir)/ruby/subst.h digest.o: $(top_srcdir)/include/ruby.h -digest.o: $(top_srcdir)/include/ruby/ruby.h digest.o: digest.c digest.o: digest.h # AUTOGENERATED DEPENDENCIES END diff --git a/ext/digest/md5/depend b/ext/digest/md5/depend index e20afe1b21..288c30aa15 100644 --- a/ext/digest/md5/depend +++ b/ext/digest/md5/depend @@ -6,11 +6,11 @@ md5init.o: $(arch_hdrdir)/ruby/config.h md5init.o: $(hdrdir)/ruby/defines.h md5init.o: $(hdrdir)/ruby/intern.h md5init.o: $(hdrdir)/ruby/missing.h +md5init.o: $(hdrdir)/ruby/ruby.h md5init.o: $(hdrdir)/ruby/st.h md5init.o: $(hdrdir)/ruby/subst.h md5init.o: $(top_srcdir)/ext/digest/digest.h md5init.o: $(top_srcdir)/include/ruby.h -md5init.o: $(top_srcdir)/include/ruby/ruby.h md5init.o: md5init.c md5init.o: md5ossl.h md5ossl.o: md5ossl.c diff --git a/ext/digest/rmd160/depend b/ext/digest/rmd160/depend index 6744c47407..49cf2afc6f 100644 --- a/ext/digest/rmd160/depend +++ b/ext/digest/rmd160/depend @@ -6,11 +6,11 @@ rmd160init.o: $(arch_hdrdir)/ruby/config.h rmd160init.o: $(hdrdir)/ruby/defines.h rmd160init.o: $(hdrdir)/ruby/intern.h rmd160init.o: $(hdrdir)/ruby/missing.h +rmd160init.o: $(hdrdir)/ruby/ruby.h rmd160init.o: $(hdrdir)/ruby/st.h rmd160init.o: $(hdrdir)/ruby/subst.h rmd160init.o: $(top_srcdir)/ext/digest/digest.h rmd160init.o: $(top_srcdir)/include/ruby.h -rmd160init.o: $(top_srcdir)/include/ruby/ruby.h rmd160init.o: rmd160init.c rmd160init.o: rmd160ossl.h rmd160ossl.o: $(RUBY_EXTCONF_H) @@ -18,11 +18,11 @@ rmd160ossl.o: $(arch_hdrdir)/ruby/config.h rmd160ossl.o: $(hdrdir)/ruby/defines.h rmd160ossl.o: $(hdrdir)/ruby/intern.h rmd160ossl.o: $(hdrdir)/ruby/missing.h +rmd160ossl.o: $(hdrdir)/ruby/ruby.h rmd160ossl.o: $(hdrdir)/ruby/st.h rmd160ossl.o: $(hdrdir)/ruby/subst.h rmd160ossl.o: $(top_srcdir)/ext/digest/defs.h rmd160ossl.o: $(top_srcdir)/include/ruby.h -rmd160ossl.o: $(top_srcdir)/include/ruby/ruby.h rmd160ossl.o: rmd160ossl.c rmd160ossl.o: rmd160ossl.h # AUTOGENERATED DEPENDENCIES END diff --git a/ext/digest/sha1/depend b/ext/digest/sha1/depend index 50ba4b61d2..2ce73c4238 100644 --- a/ext/digest/sha1/depend +++ b/ext/digest/sha1/depend @@ -6,11 +6,11 @@ sha1init.o: $(arch_hdrdir)/ruby/config.h sha1init.o: $(hdrdir)/ruby/defines.h sha1init.o: $(hdrdir)/ruby/intern.h sha1init.o: $(hdrdir)/ruby/missing.h +sha1init.o: $(hdrdir)/ruby/ruby.h sha1init.o: $(hdrdir)/ruby/st.h sha1init.o: $(hdrdir)/ruby/subst.h sha1init.o: $(top_srcdir)/ext/digest/digest.h sha1init.o: $(top_srcdir)/include/ruby.h -sha1init.o: $(top_srcdir)/include/ruby/ruby.h sha1init.o: sha1init.c sha1init.o: sha1ossl.h sha1ossl.o: $(RUBY_EXTCONF_H) @@ -18,11 +18,11 @@ sha1ossl.o: $(arch_hdrdir)/ruby/config.h sha1ossl.o: $(hdrdir)/ruby/defines.h sha1ossl.o: $(hdrdir)/ruby/intern.h sha1ossl.o: $(hdrdir)/ruby/missing.h +sha1ossl.o: $(hdrdir)/ruby/ruby.h sha1ossl.o: $(hdrdir)/ruby/st.h sha1ossl.o: $(hdrdir)/ruby/subst.h sha1ossl.o: $(top_srcdir)/ext/digest/defs.h sha1ossl.o: $(top_srcdir)/include/ruby.h -sha1ossl.o: $(top_srcdir)/include/ruby/ruby.h sha1ossl.o: sha1ossl.c sha1ossl.o: sha1ossl.h # AUTOGENERATED DEPENDENCIES END diff --git a/ext/digest/sha2/depend b/ext/digest/sha2/depend index 76d039c258..3a47a76532 100644 --- a/ext/digest/sha2/depend +++ b/ext/digest/sha2/depend @@ -6,11 +6,11 @@ sha2init.o: $(arch_hdrdir)/ruby/config.h sha2init.o: $(hdrdir)/ruby/defines.h sha2init.o: $(hdrdir)/ruby/intern.h sha2init.o: $(hdrdir)/ruby/missing.h +sha2init.o: $(hdrdir)/ruby/ruby.h sha2init.o: $(hdrdir)/ruby/st.h sha2init.o: $(hdrdir)/ruby/subst.h sha2init.o: $(top_srcdir)/ext/digest/digest.h sha2init.o: $(top_srcdir)/include/ruby.h -sha2init.o: $(top_srcdir)/include/ruby/ruby.h sha2init.o: sha2init.c sha2init.o: sha2ossl.h sha2ossl.o: $(RUBY_EXTCONF_H) @@ -18,11 +18,11 @@ sha2ossl.o: $(arch_hdrdir)/ruby/config.h sha2ossl.o: $(hdrdir)/ruby/defines.h sha2ossl.o: $(hdrdir)/ruby/intern.h sha2ossl.o: $(hdrdir)/ruby/missing.h +sha2ossl.o: $(hdrdir)/ruby/ruby.h sha2ossl.o: $(hdrdir)/ruby/st.h sha2ossl.o: $(hdrdir)/ruby/subst.h sha2ossl.o: $(top_srcdir)/ext/digest/defs.h sha2ossl.o: $(top_srcdir)/include/ruby.h -sha2ossl.o: $(top_srcdir)/include/ruby/ruby.h sha2ossl.o: sha2ossl.c sha2ossl.o: sha2ossl.h # AUTOGENERATED DEPENDENCIES END diff --git a/ext/extmk.rb b/ext/extmk.rb index ca7a3dbd25..850461a359 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -293,7 +293,7 @@ def extmake(target) unless $mswin $extflags = split_libs($extflags, $DLDFLAGS, $LDFLAGS).uniq.join(" ") end - $extlibs = merge_libs($extlibs, split_libs($libs), split_libs($LOCAL_LIBS)) + $extlibs = merge_libs($extlibs, split_libs($libs, $LOCAL_LIBS).map {|lib| lib.sub(/\A\.\//, "ext/#{target}/")}) $extpath |= $LIBPATH end ensure diff --git a/ext/fiddle/depend b/ext/fiddle/depend index e786dc71d2..47ba44e9a6 100644 --- a/ext/fiddle/depend +++ b/ext/fiddle/depend @@ -1,4 +1,55 @@ +PWD = + +CONFIGURE_LIBFFI = \ + $(LIBFFI_CONFIGURE) --disable-shared \ + --host=$(LIBFFI_ARCH) --enable-builddir=$(arch) \ + CC="$(CC)" CFLAGS="$(LIBFFI_CFLAGS)" \ + LD="$(LD)" LDFLAGS="$(LIBFFI_LDFLAGS)" + $(OBJS): $(HDRS) $(ruby_headers) \ $(hdrdir)/ruby/io.h \ $(hdrdir)/ruby/encoding.h \ $(hdrdir)/ruby/oniguruma.h + +$(STATIC_LIB) $(RUBYARCHDIR)/$(DLLIB) $(DLLIB): $(LIBFFI_A) + +$(OBJS): $(FFI_H) + +.PHONY: .FORCE hdr + +.FORCE: + +hdr: $(FFI_H) + +configure-libffi build-libffi: .FORCE +configure-libffi \ +$(LIBFFI_DIR)/include/ffi.h \ +$(LIBFFI_DIR)/include/ffitarget.h \ +$(LIBFFI_DIR)/fficonfig.h \ +$(LIBFFI_DIR)/Makefile: + $(Q) $(MAKEDIRS) $(LIBFFI_DIR) + $(Q) $(CONFIGURE_LIBFFI) + +build-libffi: $(LIBFFI_A) +build-libffi $(LIBFFI_A): + $(Q) $(SUBMAKE_LIBFFI) + +clean-libffi: + $(Q) $(SUBMAKE_LIBFFI) clean + +distclean-libffi: + $(Q) $(SUBMAKE_LIBFFI) distclean + $(Q) $(RM) $(LIBFFI_DIR)/local.exp + $(Q) $(RUBY) -rfileutils -e "FileUtils.rmdir(Dir.glob(ARGV[0]+'/**/'), :parents=>true)" $(LIBFFI_DIR) + +realclean-libffi: + $(Q) $(RMALL) $(LIBFFI_DIR) + +.PHONY clean-libffi distclean-libffi realclean-libffi: .FORCE +.PHONY clean-none distclean-none realclean-none: .FORCE + +clean: clean-$(LIBFFI_CLEAN) +distclean: distclean-$(LIBFFI_CLEAN) +realclean: realclean-$(LIBFFI_CLEAN) + +.PHONY configure: configure-libffi diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb index 466d77e6dd..2bc5b8560d 100644 --- a/ext/fiddle/extconf.rb +++ b/ext/fiddle/extconf.rb @@ -2,25 +2,97 @@ require 'mkmf' # :stopdoc: -dir_config 'libffi' +if ! enable_config('bundled-libffi', false) + dir_config 'libffi' -pkg_config("libffi") -if ver = pkg_config("libffi", "modversion") - ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored. - ver = (ver.split('.') + [0,0])[0,3] - $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }}) -end + pkg_config("libffi") and + ver = pkg_config("libffi", "modversion") -unless have_header('ffi.h') - if have_header('ffi/ffi.h') + if have_header(ffi_header = 'ffi.h') + true + elsif have_header(ffi_header = 'ffi/ffi.h') $defs.push(format('-DUSE_HEADER_HACKS')) + true + end and (have_library('ffi') || have_library('libffi')) +end or +begin + ver = Dir.glob("#{$srcdir}/libffi-*/") + .map {|n| File.basename(n)} + .max_by {|n| n.scan(/\d+/).map(&:to_i)} + unless ver + raise "missing libffi. Please install libffi." + end + + srcdir = "#{$srcdir}/#{ver}" + ffi_header = 'ffi.h' + libffi = Struct.new(*%I[dir srcdir builddir include lib a cflags ldflags opt arch]).new + libffi.dir = ver + if $srcdir == "." + libffi.builddir = "#{ver}/#{RUBY_PLATFORM}" + libffi.srcdir = "." else - raise "ffi.h is missing. Please install libffi." + libffi.builddir = libffi.dir + libffi.srcdir = relative_from(srcdir, "..") + end + libffi.include = "#{libffi.builddir}/include" + libffi.lib = "#{libffi.builddir}/.libs" + libffi.a = "#{libffi.lib}/libffi.#{$LIBEXT}" + nowarn = CONFIG.merge("warnflags"=>"") + libffi.cflags = RbConfig.expand("$(CFLAGS)", nowarn) + ver = ver[/libffi-(.*)/, 1] + + FileUtils.mkdir_p(libffi.dir) + libffi.opt = CONFIG['configure_args'][/'(-C)'/, 1] + libffi.ldflags = RbConfig.expand("$(LDFLAGS) #{libpathflag([relative_from($topdir, "..")])} #{$LIBRUBYARG}") + libffi.arch = RbConfig::CONFIG['host'] + if $mswin + $defs << "-DFFI_BUILDING" + libffi_config = "#{relative_from($srcdir, '..')}/win32/libffi-config.rb" + config = CONFIG.merge("top_srcdir" => $top_srcdir) + args = $ruby.gsub(/:\/=\\/, '') + args.gsub!(/\)\\/, ')/') + args = args.shellsplit + args.map! {|s| RbConfig.expand(s, config)} + args << '-C' << libffi.dir << libffi_config + opts = {} + else + args = %W[sh #{libffi.srcdir}/configure ] + opts = {chdir: libffi.dir} + end + cc = RbConfig::CONFIG['CC'] + cxx = RbConfig::CONFIG['CXX'] + ld = RbConfig::CONFIG['LD'] + args.concat %W[ + --srcdir=#{libffi.srcdir} + --disable-shared --host=#{libffi.arch} + --enable-builddir=#{RUBY_PLATFORM} + ] + args << libffi.opt if libffi.opt + args.concat %W[ + CC=#{cc} CFLAGS=#{libffi.cflags} + CXX=#{cxx} CXXFLAGS=#{RbConfig.expand("$(CXXFLAGS)", nowarn)} + LD=#{ld} LDFLAGS=#{libffi.ldflags} + ] + + FileUtils.rm_f("#{libffi.include}/ffitarget.h") + Logging::open do + Logging.message("%p in %p\n", args, opts) + system(*args, **opts) or + raise "failed to configure libffi. Please install libffi." + end + if $mswin && File.file?("#{libffi.include}/ffitarget.h") + FileUtils.rm_f("#{libffi.include}/ffitarget.h") end + unless File.file?("#{libffi.include}/ffitarget.h") + FileUtils.cp("#{srcdir}/src/x86/ffitarget.h", libffi.include, preserve: true) + end + $INCFLAGS << " -I" << libffi.include end -unless have_library('ffi') || have_library('libffi') - raise "libffi is missing. Please install libffi." +if ver + ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored. + ver = (ver.split('.') + [0,0])[0,3] + $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }}) end have_header 'sys/mman.h' @@ -39,7 +111,7 @@ elsif have_header "windows.h" end end -have_const('FFI_STDCALL', 'ffi.h') || have_const('FFI_STDCALL', 'ffi/ffi.h') +have_const('FFI_STDCALL', ffi_header) config = File.read(RbConfig.expand(File.join($arch_hdrdir, "ruby/config.h"))) types = {"SIZE_T"=>"SSIZE_T", "PTRDIFF_T"=>nil, "INTPTR_T"=>nil} @@ -55,6 +127,41 @@ types.each do |type, signed| end end -create_makefile 'fiddle' +if libffi + $LOCAL_LIBS.prepend("./#{libffi.a} ").strip! +end +create_makefile 'fiddle' do |conf| + if !libffi + next conf << "LIBFFI_CLEAN = none\n" + elsif $gnumake && !$nmake + submake = "$(MAKE) -C $(LIBFFI_DIR)\n" + else + submake = "cd $(LIBFFI_DIR) && \\\n\t\t" << "#{config_string("exec")} $(MAKE)".strip + end + if $nmake + cmd = "$(RUBY) -C $(LIBFFI_DIR) #{libffi_config} --srcdir=$(LIBFFI_SRCDIR)" + else + cmd = "cd $(LIBFFI_DIR) && #$exec $(LIBFFI_SRCDIR)/configure #{libffi.opt}" + end + sep = "/" + seprpl = config_string('BUILD_FILE_SEPARATOR') {|s| sep = s; ":/=#{s}" if s != "/"} || "" + conf << <<-MK.gsub(/^ +| +$/, '') + PWD = + LIBFFI_CONFIGURE = #{cmd} + LIBFFI_ARCH = #{libffi.arch} + LIBFFI_SRCDIR = #{libffi.srcdir} + LIBFFI_DIR = #{libffi.dir} + LIBFFI_A = #{libffi.a} + LIBFFI_CFLAGS = #{libffi.cflags} + LIBFFI_LDFLAGS = #{libffi.ldflags} + FFI_H = $(LIBFFI_DIR)/include/ffi.h + SUBMAKE_LIBFFI = #{submake} + LIBFFI_CLEAN = libffi + MK +end + +if libffi + $LIBPATH.pop +end # :startdoc: diff --git a/ext/fiddle/extlibs b/ext/fiddle/extlibs new file mode 100644 index 0000000000..7d5fda5247 --- /dev/null +++ b/ext/fiddle/extlibs @@ -0,0 +1,2 @@ +ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz md5:83b89587607e3eb65c70d361f13bab43 + win32/libffi-3.2.1-mswin.patch -p0 diff --git a/ext/fiddle/handle.c b/ext/fiddle/handle.c index 36970a2248..4cfeedaedd 100644 --- a/ext/fiddle/handle.c +++ b/ext/fiddle/handle.c @@ -170,6 +170,7 @@ rb_fiddle_handle_initialize(int argc, VALUE argv[], VALUE self) # ifdef _WIN32_WCE ptr = dlopen("coredll.dll", cflag); # else + (void)cflag; ptr = w32_coredll(); # endif } @@ -313,7 +314,7 @@ fiddle_handle_sym(void *handle, const char *name) { #if defined(HAVE_DLERROR) const char *err; -# define CHECK_DLERROR if( err = dlerror() ){ func = 0; } +# define CHECK_DLERROR if ((err = dlerror()) != 0) { func = 0; } #else # define CHECK_DLERROR #endif diff --git a/ext/fiddle/win32/fficonfig.h b/ext/fiddle/win32/fficonfig.h new file mode 100755 index 0000000000..776808159c --- /dev/null +++ b/ext/fiddle/win32/fficonfig.h @@ -0,0 +1,29 @@ +#define HAVE_ALLOCA 1 +#define HAVE_MEMCPY 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#if _MSC_VER >= 1600 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#endif + +#define SIZEOF_DOUBLE 8 +#if defined(X86_WIN64) +#define SIZEOF_SIZE_T 8 +#else +#define SIZEOF_SIZE_T 4 +#endif + +#define STACK_DIRECTION -1 + +#define STDC_HEADERS 1 + +#ifdef LIBFFI_ASM +#define FFI_HIDDEN(name) +#else +#define FFI_HIDDEN +#endif + diff --git a/ext/fiddle/win32/libffi-3.2.1-mswin.patch b/ext/fiddle/win32/libffi-3.2.1-mswin.patch new file mode 100644 index 0000000000..782cf41e36 --- /dev/null +++ b/ext/fiddle/win32/libffi-3.2.1-mswin.patch @@ -0,0 +1,132 @@ +diff -ru libffi-3.2.1/src/x86/ffi.c libffi-3.2.1/src/x86/ffi.c +--- libffi-3.2.1/src/x86/ffi.c 2014-11-08 21:47:24.000000000 +0900 ++++ libffi-3.2.1/src/x86/ffi.c 2014-12-22 16:00:42.000000000 +0900 +@@ -99,11 +99,13 @@ + i != 0; + i--, p_arg += dir, p_argv += dir) + { ++ size_t z; ++ + /* Align if necessary */ + if ((sizeof(void*) - 1) & (size_t) argp) + argp = (char *) ALIGN(argp, sizeof(void*)); + +- size_t z = (*p_arg)->size; ++ z = (*p_arg)->size; + + #ifdef X86_WIN64 + if (z > FFI_SIZEOF_ARG +@@ -599,11 +601,13 @@ + i != 0; + i--, p_arg += dir, p_argv += dir) + { ++ size_t z; ++ + /* Align if necessary */ + if ((sizeof(void*) - 1) & (size_t) argp) + argp = (char *) ALIGN(argp, sizeof(void*)); + +- size_t z = (*p_arg)->size; ++ z = (*p_arg)->size; + + #ifdef X86_WIN64 + if (z > FFI_SIZEOF_ARG +@@ -642,7 +646,7 @@ + #endif + } + +- return (size_t)argp - (size_t)stack; ++ return (int)((size_t)argp - (size_t)stack); + } + + #define FFI_INIT_TRAMPOLINE_WIN64(TRAMP,FUN,CTX,MASK) \ +diff -ru libffi-3.2.1/src/x86/ffitarget.h libffi-3.2.1/src/x86/ffitarget.h +--- libffi-3.2.1/src/x86/ffitarget.h 2014-11-08 21:47:24.000000000 +0900 ++++ libffi-3.2.1/src/x86/ffitarget.h 2014-12-22 15:45:54.000000000 +0900 +@@ -50,7 +50,9 @@ + #endif + + #define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION ++#ifndef _MSC_VER + #define FFI_TARGET_HAS_COMPLEX_TYPE ++#endif + + /* ---- Generic type definitions ----------------------------------------- */ + +diff -ru libffi-3.2.1/src/x86/win64.S libffi-3.2.1/src/x86/win64.S +--- libffi-3.2.1/src/x86/win64.S 2014-11-08 21:47:24.000000000 +0900 ++++ libffi-3.2.1/src/x86/win64.S 2014-12-22 16:14:40.000000000 +0900 +@@ -127,7 +127,7 @@ + + mov rcx, QWORD PTR RVALUE[rbp] + mov DWORD PTR [rcx], eax +- jmp ret_void$ ++ jmp SHORT ret_void$ + + ret_struct2b$: + cmp DWORD PTR CIF_FLAGS[rbp], FFI_TYPE_SMALL_STRUCT_2B +@@ -135,7 +135,7 @@ + + mov rcx, QWORD PTR RVALUE[rbp] + mov WORD PTR [rcx], ax +- jmp ret_void$ ++ jmp SHORT ret_void$ + + ret_struct1b$: + cmp DWORD PTR CIF_FLAGS[rbp], FFI_TYPE_SMALL_STRUCT_1B +@@ -143,7 +143,7 @@ + + mov rcx, QWORD PTR RVALUE[rbp] + mov BYTE PTR [rcx], al +- jmp ret_void$ ++ jmp SHORT ret_void$ + + ret_uint8$: + cmp DWORD PTR CIF_FLAGS[rbp], FFI_TYPE_UINT8 +@@ -152,7 +152,7 @@ + mov rcx, QWORD PTR RVALUE[rbp] + movzx rax, al + mov QWORD PTR [rcx], rax +- jmp ret_void$ ++ jmp SHORT ret_void$ + + ret_sint8$: + cmp DWORD PTR CIF_FLAGS[rbp], FFI_TYPE_SINT8 +@@ -161,7 +161,7 @@ + mov rcx, QWORD PTR RVALUE[rbp] + movsx rax, al + mov QWORD PTR [rcx], rax +- jmp ret_void$ ++ jmp SHORT ret_void$ + + ret_uint16$: + cmp DWORD PTR CIF_FLAGS[rbp], FFI_TYPE_UINT16 +@@ -188,7 +188,13 @@ + mov rcx, QWORD PTR RVALUE[rbp] + mov eax, eax + mov QWORD PTR [rcx], rax +- jmp SHORT ret_void$ ++ ++ret_void$: ++ xor rax, rax ++ ++ lea rsp, QWORD PTR [rbp+16] ++ pop rbp ++ ret 0 + + ret_sint32$: + cmp DWORD PTR CIF_FLAGS[rbp], FFI_TYPE_SINT32 +@@ -247,13 +253,6 @@ + cdqe + mov QWORD PTR [rcx], rax + jmp SHORT ret_void$ +- +-ret_void$: +- xor rax, rax +- +- lea rsp, QWORD PTR [rbp+16] +- pop rbp +- ret 0 + ffi_call_win64 ENDP + _TEXT ENDS + END diff --git a/ext/fiddle/win32/libffi-config.rb b/ext/fiddle/win32/libffi-config.rb new file mode 100755 index 0000000000..ecd3b086c0 --- /dev/null +++ b/ext/fiddle/win32/libffi-config.rb @@ -0,0 +1,47 @@ +#!/usr/bin/ruby +require 'fileutils' + +basedir = File.dirname(__FILE__) +conf = {} +enable = {} +until ARGV.empty? + arg = ARGV.shift + case arg + when '-C' + # ignore + when /\A--srcdir=(.*)/ + conf['SRCDIR'] = srcdir = $1 + when /\A(CC|CFLAGS|CXX|CXXFLAGS|LD|LDFLAGS)=(.*)/ + conf[$1] = $2 + when /\A--host=(.*)/ + host = $1 + when /\A--enable-([^=]+)(?:=(.*))?/ + enable[$1] = $2 || true + when /\A--disable-([^=]+)/ + enable[$1] = false + end +end + +IO.foreach("#{srcdir}/configure.ac") do |line| + if /^AC_INIT\((.*)\)/ =~ line + version = $1.split(/,\s*/)[1] + version.gsub!(/\A\[|\]\z/, '') + conf['VERSION'] = version + break + end +end + +builddir = srcdir == "." ? enable['builddir'] : "." +conf['TARGET'] = /^x64/ =~ host ? "X86_WIN64" : "X86_WIN32" + +FileUtils.mkdir_p([builddir, "#{builddir}/include", "#{builddir}/src/x86"]) +FileUtils.cp("#{basedir}/fficonfig.h", ".", preserve: true) + +hdr = IO.binread("#{srcdir}/include/ffi.h.in") +hdr.gsub!(/@(\w+)@/) {conf[$1] || $&} +hdr.gsub!(/^(#if\s+)@\w+@/, '\10') +IO.binwrite("#{builddir}/include/ffi.h", hdr) + +mk = IO.binread("#{basedir}/libffi.mk.tmpl") +mk.gsub!(/@(\w+)@/) {conf[$1] || $&} +IO.binwrite("Makefile", mk) diff --git a/ext/fiddle/win32/libffi.mk.tmpl b/ext/fiddle/win32/libffi.mk.tmpl new file mode 100755 index 0000000000..621451e7a2 --- /dev/null +++ b/ext/fiddle/win32/libffi.mk.tmpl @@ -0,0 +1,96 @@ +# -*- makefile -*- +# ==================================================================== +# +# libffi Windows Makefile +# +# +# ==================================================================== +# +NAME = ffi +TARGET = @TARGET@ +CC = cl +!if "$(TARGET)" == "X86_WIN64" +AS = ml64 +!else +AS = ml +!endif +AR = link +DLEXT = dll +OBJEXT = obj +LIBEXT = lib +TOPDIR = @SRCDIR@ +CPP = $(CC) -EP +CFLAGS = @CFLAGS@ +ARFLAGS = -lib +ASFLAGS = -coff -W3 -Cx +INCLUDES= -I. -I./include -I./src/x86 \ + -I$(TOPDIR)/include -I$(TOPDIR)/include/src/x86 + +SRCDIR = $(TOPDIR)/src +WORKDIR = ./.libs +BUILDDIR= ./src +LIBNAME = lib$(NAME) +STATICLIB= $(WORKDIR)/$(LIBNAME).$(LIBEXT) + +HEADERS = \ + ./fficonfig.h +FFI_HEADERS = \ + ./include/ffi.h \ + ./include/ffitarget.h + +!if "$(TARGET)" == "X86_WIN32" +OSSRC = win32 +!else if "$(TARGET)" == "X86_WIN64" +OSSRC = win64 +!else +! error unknown target: $(TARGET) +!endif + +OBJECTS = \ + $(BUILDDIR)/closures.$(OBJEXT) \ + $(BUILDDIR)/debug.$(OBJEXT) \ + $(BUILDDIR)/java_raw_api.$(OBJEXT) \ + $(BUILDDIR)/prep_cif.$(OBJEXT) \ + $(BUILDDIR)/raw_api.$(OBJEXT) \ + $(BUILDDIR)/types.$(OBJEXT) \ + $(BUILDDIR)/x86/ffi.$(OBJEXT) \ + $(BUILDDIR)/x86/$(OSSRC).$(OBJEXT) +ASMSRCS = \ + $(BUILDDIR)/x86/$(OSSRC).asm + +.SUFFIXES : .S .asm + +all: $(WORKDIR) $(STATICLIB) + +{$(SRCDIR)}.c{$(BUILDDIR)}.$(OBJEXT): + $(CC) -c $(CFLAGS) $(INCLUDES) -Fo$(@:\=/) -Fd$(WORKDIR)/$(NAME)-src $(<:\=/) + +{$(SRCDIR)/x86}.c{$(BUILDDIR)/x86}.$(OBJEXT): + $(CC) -c $(CFLAGS) $(INCLUDES) -Fo$(@:\=/) -Fd$(WORKDIR)/$(NAME)-src $(<:\=/) + +{$(SRCDIR)/x86}.S{$(BUILDDIR)/x86}.asm: + $(CPP) $(CFLAGS) $(INCLUDES) $(<:\=/) >$(@:\=/) + +{$(BUILDDIR)/x86}.asm{$(BUILDDIR)/x86}.$(OBJEXT): + $(AS) -c $(ASFLAGS) -Fo $(@:\=/) $(<:\=/) + +$(BUILDDIR)/x86/$(OSSRC).asm: $(SRCDIR)/x86/$(OSSRC).S + +$(OBJECTS): $(FFI_HEADERS) $(HEADERS) + +$(WORKDIR): + -@if not exist "$(WORKDIR:/=\)\$(NULL)" mkdir $(WORKDIR:/=\) + +$(STATICLIB): $(WORKDIR) $(OBJECTS) + $(AR) $(ARFLAGS) -out:$(STATICLIB) @<< + $(OBJECTS) +<< + +clean: + -@del /Q $(OBJECTS:/=\) 2>NUL + -@del /Q $(ASMSRCS:/=\) 2>NUL + -@del /Q /S $(WORKDIR:/=\) 2>NUL + +distclean: clean + -@del /Q $(HEADERS:/=\) $(FFI_HEADERS:/=\) 2>NUL + -@del /Q Makefile 2>NUL diff --git a/ext/io/console/console.c b/ext/io/console/console.c index e4bea6eed0..0290a65a72 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -647,7 +647,7 @@ console_dev(VALUE klass) if ((fptr = RFILE(con)->fptr) && GetReadFD(fptr) != -1) return con; } - rb_mod_remove_const(klass, ID2SYM(id_console)); + rb_const_remove(klass, id_console); } { VALUE args[2]; diff --git a/ext/json/generator/depend b/ext/json/generator/depend index e8ad5df4a3..b7373cde1f 100644 --- a/ext/json/generator/depend +++ b/ext/json/generator/depend @@ -11,11 +11,11 @@ generator.o: $(hdrdir)/ruby/missing.h generator.o: $(hdrdir)/ruby/oniguruma.h generator.o: $(hdrdir)/ruby/re.h generator.o: $(hdrdir)/ruby/regex.h +generator.o: $(hdrdir)/ruby/ruby.h generator.o: $(hdrdir)/ruby/st.h generator.o: $(hdrdir)/ruby/subst.h generator.o: $(top_srcdir)/ext/json/fbuffer/fbuffer.h generator.o: $(top_srcdir)/include/ruby.h -generator.o: $(top_srcdir)/include/ruby/ruby.h generator.o: generator.c generator.o: generator.h # AUTOGENERATED DEPENDENCIES END diff --git a/ext/json/parser/depend b/ext/json/parser/depend index 98961f67f1..bc5db06404 100644 --- a/ext/json/parser/depend +++ b/ext/json/parser/depend @@ -9,11 +9,11 @@ parser.o: $(hdrdir)/ruby/encoding.h parser.o: $(hdrdir)/ruby/intern.h parser.o: $(hdrdir)/ruby/missing.h parser.o: $(hdrdir)/ruby/oniguruma.h +parser.o: $(hdrdir)/ruby/ruby.h parser.o: $(hdrdir)/ruby/st.h parser.o: $(hdrdir)/ruby/subst.h parser.o: $(top_srcdir)/ext/json/fbuffer/fbuffer.h parser.o: $(top_srcdir)/include/ruby.h -parser.o: $(top_srcdir)/include/ruby/ruby.h parser.o: parser.c parser.o: parser.h parser.o: parser.rl diff --git a/ext/nkf/depend b/ext/nkf/depend index 7c5315bf48..16421508b1 100644 --- a/ext/nkf/depend +++ b/ext/nkf/depend @@ -10,9 +10,9 @@ nkf.o: $(hdrdir)/ruby/encoding.h nkf.o: $(hdrdir)/ruby/intern.h nkf.o: $(hdrdir)/ruby/missing.h nkf.o: $(hdrdir)/ruby/oniguruma.h +nkf.o: $(hdrdir)/ruby/ruby.h nkf.o: $(hdrdir)/ruby/st.h nkf.o: $(hdrdir)/ruby/subst.h -nkf.o: $(top_srcdir)/include/ruby/ruby.h nkf.o: nkf-utf8/config.h nkf.o: nkf-utf8/nkf.c nkf.o: nkf-utf8/nkf.h diff --git a/ext/objspace/depend b/ext/objspace/depend index 7d37cbf20e..32af521ba5 100644 --- a/ext/objspace/depend +++ b/ext/objspace/depend @@ -8,10 +8,10 @@ object_tracing.o: $(hdrdir)/ruby/intern.h object_tracing.o: $(hdrdir)/ruby/io.h object_tracing.o: $(hdrdir)/ruby/missing.h object_tracing.o: $(hdrdir)/ruby/oniguruma.h +object_tracing.o: $(hdrdir)/ruby/ruby.h object_tracing.o: $(hdrdir)/ruby/st.h object_tracing.o: $(hdrdir)/ruby/subst.h object_tracing.o: $(top_srcdir)/include/ruby.h -object_tracing.o: $(top_srcdir)/include/ruby/ruby.h object_tracing.o: $(top_srcdir)/internal.h object_tracing.o: object_tracing.c object_tracing.o: objspace.h @@ -25,11 +25,11 @@ objspace.o: $(hdrdir)/ruby/missing.h objspace.o: $(hdrdir)/ruby/oniguruma.h objspace.o: $(hdrdir)/ruby/re.h objspace.o: $(hdrdir)/ruby/regex.h +objspace.o: $(hdrdir)/ruby/ruby.h objspace.o: $(hdrdir)/ruby/st.h objspace.o: $(hdrdir)/ruby/subst.h objspace.o: $(top_srcdir)/gc.h objspace.o: $(top_srcdir)/include/ruby.h -objspace.o: $(top_srcdir)/include/ruby/ruby.h objspace.o: $(top_srcdir)/internal.h objspace.o: $(top_srcdir)/node.h objspace.o: objspace.c @@ -42,6 +42,7 @@ objspace_dump.o: $(hdrdir)/ruby/intern.h objspace_dump.o: $(hdrdir)/ruby/io.h objspace_dump.o: $(hdrdir)/ruby/missing.h objspace_dump.o: $(hdrdir)/ruby/oniguruma.h +objspace_dump.o: $(hdrdir)/ruby/ruby.h objspace_dump.o: $(hdrdir)/ruby/st.h objspace_dump.o: $(hdrdir)/ruby/subst.h objspace_dump.o: $(hdrdir)/ruby/thread_native.h @@ -51,7 +52,6 @@ objspace_dump.o: $(top_srcdir)/ccan/list/list.h objspace_dump.o: $(top_srcdir)/ccan/str/str.h objspace_dump.o: $(top_srcdir)/gc.h objspace_dump.o: $(top_srcdir)/include/ruby.h -objspace_dump.o: $(top_srcdir)/include/ruby/ruby.h objspace_dump.o: $(top_srcdir)/internal.h objspace_dump.o: $(top_srcdir)/method.h objspace_dump.o: $(top_srcdir)/node.h diff --git a/ext/openssl/depend b/ext/openssl/depend index 31439e8451..21ba20abde 100644 --- a/ext/openssl/depend +++ b/ext/openssl/depend @@ -10,12 +10,12 @@ ossl.o: $(hdrdir)/ruby/intern.h ossl.o: $(hdrdir)/ruby/io.h ossl.o: $(hdrdir)/ruby/missing.h ossl.o: $(hdrdir)/ruby/oniguruma.h +ossl.o: $(hdrdir)/ruby/ruby.h ossl.o: $(hdrdir)/ruby/st.h ossl.o: $(hdrdir)/ruby/subst.h ossl.o: $(hdrdir)/ruby/thread.h ossl.o: $(hdrdir)/ruby/thread_native.h ossl.o: $(top_srcdir)/include/ruby.h -ossl.o: $(top_srcdir)/include/ruby/ruby.h ossl.o: openssl_missing.h ossl.o: ossl.c ossl.o: ossl.h @@ -46,11 +46,11 @@ ossl_asn1.o: $(hdrdir)/ruby/intern.h ossl_asn1.o: $(hdrdir)/ruby/io.h ossl_asn1.o: $(hdrdir)/ruby/missing.h ossl_asn1.o: $(hdrdir)/ruby/oniguruma.h +ossl_asn1.o: $(hdrdir)/ruby/ruby.h ossl_asn1.o: $(hdrdir)/ruby/st.h ossl_asn1.o: $(hdrdir)/ruby/subst.h ossl_asn1.o: $(hdrdir)/ruby/thread.h ossl_asn1.o: $(top_srcdir)/include/ruby.h -ossl_asn1.o: $(top_srcdir)/include/ruby/ruby.h ossl_asn1.o: openssl_missing.h ossl_asn1.o: ossl.h ossl_asn1.o: ossl_asn1.c @@ -81,11 +81,11 @@ ossl_bio.o: $(hdrdir)/ruby/intern.h ossl_bio.o: $(hdrdir)/ruby/io.h ossl_bio.o: $(hdrdir)/ruby/missing.h ossl_bio.o: $(hdrdir)/ruby/oniguruma.h +ossl_bio.o: $(hdrdir)/ruby/ruby.h ossl_bio.o: $(hdrdir)/ruby/st.h ossl_bio.o: $(hdrdir)/ruby/subst.h ossl_bio.o: $(hdrdir)/ruby/thread.h ossl_bio.o: $(top_srcdir)/include/ruby.h -ossl_bio.o: $(top_srcdir)/include/ruby/ruby.h ossl_bio.o: openssl_missing.h ossl_bio.o: ossl.h ossl_bio.o: ossl_asn1.h @@ -116,11 +116,11 @@ ossl_bn.o: $(hdrdir)/ruby/intern.h ossl_bn.o: $(hdrdir)/ruby/io.h ossl_bn.o: $(hdrdir)/ruby/missing.h ossl_bn.o: $(hdrdir)/ruby/oniguruma.h +ossl_bn.o: $(hdrdir)/ruby/ruby.h ossl_bn.o: $(hdrdir)/ruby/st.h ossl_bn.o: $(hdrdir)/ruby/subst.h ossl_bn.o: $(hdrdir)/ruby/thread.h ossl_bn.o: $(top_srcdir)/include/ruby.h -ossl_bn.o: $(top_srcdir)/include/ruby/ruby.h ossl_bn.o: openssl_missing.h ossl_bn.o: ossl.h ossl_bn.o: ossl_asn1.h @@ -151,11 +151,11 @@ ossl_cipher.o: $(hdrdir)/ruby/intern.h ossl_cipher.o: $(hdrdir)/ruby/io.h ossl_cipher.o: $(hdrdir)/ruby/missing.h ossl_cipher.o: $(hdrdir)/ruby/oniguruma.h +ossl_cipher.o: $(hdrdir)/ruby/ruby.h ossl_cipher.o: $(hdrdir)/ruby/st.h ossl_cipher.o: $(hdrdir)/ruby/subst.h ossl_cipher.o: $(hdrdir)/ruby/thread.h ossl_cipher.o: $(top_srcdir)/include/ruby.h -ossl_cipher.o: $(top_srcdir)/include/ruby/ruby.h ossl_cipher.o: openssl_missing.h ossl_cipher.o: ossl.h ossl_cipher.o: ossl_asn1.h @@ -186,11 +186,11 @@ ossl_config.o: $(hdrdir)/ruby/intern.h ossl_config.o: $(hdrdir)/ruby/io.h ossl_config.o: $(hdrdir)/ruby/missing.h ossl_config.o: $(hdrdir)/ruby/oniguruma.h +ossl_config.o: $(hdrdir)/ruby/ruby.h ossl_config.o: $(hdrdir)/ruby/st.h ossl_config.o: $(hdrdir)/ruby/subst.h ossl_config.o: $(hdrdir)/ruby/thread.h ossl_config.o: $(top_srcdir)/include/ruby.h -ossl_config.o: $(top_srcdir)/include/ruby/ruby.h ossl_config.o: openssl_missing.h ossl_config.o: ossl.h ossl_config.o: ossl_asn1.h @@ -221,11 +221,11 @@ ossl_digest.o: $(hdrdir)/ruby/intern.h ossl_digest.o: $(hdrdir)/ruby/io.h ossl_digest.o: $(hdrdir)/ruby/missing.h ossl_digest.o: $(hdrdir)/ruby/oniguruma.h +ossl_digest.o: $(hdrdir)/ruby/ruby.h ossl_digest.o: $(hdrdir)/ruby/st.h ossl_digest.o: $(hdrdir)/ruby/subst.h ossl_digest.o: $(hdrdir)/ruby/thread.h ossl_digest.o: $(top_srcdir)/include/ruby.h -ossl_digest.o: $(top_srcdir)/include/ruby/ruby.h ossl_digest.o: openssl_missing.h ossl_digest.o: ossl.h ossl_digest.o: ossl_asn1.h @@ -256,11 +256,11 @@ ossl_engine.o: $(hdrdir)/ruby/intern.h ossl_engine.o: $(hdrdir)/ruby/io.h ossl_engine.o: $(hdrdir)/ruby/missing.h ossl_engine.o: $(hdrdir)/ruby/oniguruma.h +ossl_engine.o: $(hdrdir)/ruby/ruby.h ossl_engine.o: $(hdrdir)/ruby/st.h ossl_engine.o: $(hdrdir)/ruby/subst.h ossl_engine.o: $(hdrdir)/ruby/thread.h ossl_engine.o: $(top_srcdir)/include/ruby.h -ossl_engine.o: $(top_srcdir)/include/ruby/ruby.h ossl_engine.o: openssl_missing.h ossl_engine.o: ossl.h ossl_engine.o: ossl_asn1.h @@ -291,11 +291,11 @@ ossl_hmac.o: $(hdrdir)/ruby/intern.h ossl_hmac.o: $(hdrdir)/ruby/io.h ossl_hmac.o: $(hdrdir)/ruby/missing.h ossl_hmac.o: $(hdrdir)/ruby/oniguruma.h +ossl_hmac.o: $(hdrdir)/ruby/ruby.h ossl_hmac.o: $(hdrdir)/ruby/st.h ossl_hmac.o: $(hdrdir)/ruby/subst.h ossl_hmac.o: $(hdrdir)/ruby/thread.h ossl_hmac.o: $(top_srcdir)/include/ruby.h -ossl_hmac.o: $(top_srcdir)/include/ruby/ruby.h ossl_hmac.o: openssl_missing.h ossl_hmac.o: ossl.h ossl_hmac.o: ossl_asn1.h @@ -326,11 +326,11 @@ ossl_ns_spki.o: $(hdrdir)/ruby/intern.h ossl_ns_spki.o: $(hdrdir)/ruby/io.h ossl_ns_spki.o: $(hdrdir)/ruby/missing.h ossl_ns_spki.o: $(hdrdir)/ruby/oniguruma.h +ossl_ns_spki.o: $(hdrdir)/ruby/ruby.h ossl_ns_spki.o: $(hdrdir)/ruby/st.h ossl_ns_spki.o: $(hdrdir)/ruby/subst.h ossl_ns_spki.o: $(hdrdir)/ruby/thread.h ossl_ns_spki.o: $(top_srcdir)/include/ruby.h -ossl_ns_spki.o: $(top_srcdir)/include/ruby/ruby.h ossl_ns_spki.o: openssl_missing.h ossl_ns_spki.o: ossl.h ossl_ns_spki.o: ossl_asn1.h @@ -361,11 +361,11 @@ ossl_ocsp.o: $(hdrdir)/ruby/intern.h ossl_ocsp.o: $(hdrdir)/ruby/io.h ossl_ocsp.o: $(hdrdir)/ruby/missing.h ossl_ocsp.o: $(hdrdir)/ruby/oniguruma.h +ossl_ocsp.o: $(hdrdir)/ruby/ruby.h ossl_ocsp.o: $(hdrdir)/ruby/st.h ossl_ocsp.o: $(hdrdir)/ruby/subst.h ossl_ocsp.o: $(hdrdir)/ruby/thread.h ossl_ocsp.o: $(top_srcdir)/include/ruby.h -ossl_ocsp.o: $(top_srcdir)/include/ruby/ruby.h ossl_ocsp.o: openssl_missing.h ossl_ocsp.o: ossl.h ossl_ocsp.o: ossl_asn1.h @@ -396,11 +396,11 @@ ossl_pkcs12.o: $(hdrdir)/ruby/intern.h ossl_pkcs12.o: $(hdrdir)/ruby/io.h ossl_pkcs12.o: $(hdrdir)/ruby/missing.h ossl_pkcs12.o: $(hdrdir)/ruby/oniguruma.h +ossl_pkcs12.o: $(hdrdir)/ruby/ruby.h ossl_pkcs12.o: $(hdrdir)/ruby/st.h ossl_pkcs12.o: $(hdrdir)/ruby/subst.h ossl_pkcs12.o: $(hdrdir)/ruby/thread.h ossl_pkcs12.o: $(top_srcdir)/include/ruby.h -ossl_pkcs12.o: $(top_srcdir)/include/ruby/ruby.h ossl_pkcs12.o: openssl_missing.h ossl_pkcs12.o: ossl.h ossl_pkcs12.o: ossl_asn1.h @@ -431,11 +431,11 @@ ossl_pkcs5.o: $(hdrdir)/ruby/intern.h ossl_pkcs5.o: $(hdrdir)/ruby/io.h ossl_pkcs5.o: $(hdrdir)/ruby/missing.h ossl_pkcs5.o: $(hdrdir)/ruby/oniguruma.h +ossl_pkcs5.o: $(hdrdir)/ruby/ruby.h ossl_pkcs5.o: $(hdrdir)/ruby/st.h ossl_pkcs5.o: $(hdrdir)/ruby/subst.h ossl_pkcs5.o: $(hdrdir)/ruby/thread.h ossl_pkcs5.o: $(top_srcdir)/include/ruby.h -ossl_pkcs5.o: $(top_srcdir)/include/ruby/ruby.h ossl_pkcs5.o: openssl_missing.h ossl_pkcs5.o: ossl.h ossl_pkcs5.o: ossl_asn1.h @@ -466,11 +466,11 @@ ossl_pkcs7.o: $(hdrdir)/ruby/intern.h ossl_pkcs7.o: $(hdrdir)/ruby/io.h ossl_pkcs7.o: $(hdrdir)/ruby/missing.h ossl_pkcs7.o: $(hdrdir)/ruby/oniguruma.h +ossl_pkcs7.o: $(hdrdir)/ruby/ruby.h ossl_pkcs7.o: $(hdrdir)/ruby/st.h ossl_pkcs7.o: $(hdrdir)/ruby/subst.h ossl_pkcs7.o: $(hdrdir)/ruby/thread.h ossl_pkcs7.o: $(top_srcdir)/include/ruby.h -ossl_pkcs7.o: $(top_srcdir)/include/ruby/ruby.h ossl_pkcs7.o: openssl_missing.h ossl_pkcs7.o: ossl.h ossl_pkcs7.o: ossl_asn1.h @@ -501,11 +501,11 @@ ossl_pkey.o: $(hdrdir)/ruby/intern.h ossl_pkey.o: $(hdrdir)/ruby/io.h ossl_pkey.o: $(hdrdir)/ruby/missing.h ossl_pkey.o: $(hdrdir)/ruby/oniguruma.h +ossl_pkey.o: $(hdrdir)/ruby/ruby.h ossl_pkey.o: $(hdrdir)/ruby/st.h ossl_pkey.o: $(hdrdir)/ruby/subst.h ossl_pkey.o: $(hdrdir)/ruby/thread.h ossl_pkey.o: $(top_srcdir)/include/ruby.h -ossl_pkey.o: $(top_srcdir)/include/ruby/ruby.h ossl_pkey.o: openssl_missing.h ossl_pkey.o: ossl.h ossl_pkey.o: ossl_asn1.h @@ -536,11 +536,11 @@ ossl_pkey_dh.o: $(hdrdir)/ruby/intern.h ossl_pkey_dh.o: $(hdrdir)/ruby/io.h ossl_pkey_dh.o: $(hdrdir)/ruby/missing.h ossl_pkey_dh.o: $(hdrdir)/ruby/oniguruma.h +ossl_pkey_dh.o: $(hdrdir)/ruby/ruby.h ossl_pkey_dh.o: $(hdrdir)/ruby/st.h ossl_pkey_dh.o: $(hdrdir)/ruby/subst.h ossl_pkey_dh.o: $(hdrdir)/ruby/thread.h ossl_pkey_dh.o: $(top_srcdir)/include/ruby.h -ossl_pkey_dh.o: $(top_srcdir)/include/ruby/ruby.h ossl_pkey_dh.o: openssl_missing.h ossl_pkey_dh.o: ossl.h ossl_pkey_dh.o: ossl_asn1.h @@ -571,11 +571,11 @@ ossl_pkey_dsa.o: $(hdrdir)/ruby/intern.h ossl_pkey_dsa.o: $(hdrdir)/ruby/io.h ossl_pkey_dsa.o: $(hdrdir)/ruby/missing.h ossl_pkey_dsa.o: $(hdrdir)/ruby/oniguruma.h +ossl_pkey_dsa.o: $(hdrdir)/ruby/ruby.h ossl_pkey_dsa.o: $(hdrdir)/ruby/st.h ossl_pkey_dsa.o: $(hdrdir)/ruby/subst.h ossl_pkey_dsa.o: $(hdrdir)/ruby/thread.h ossl_pkey_dsa.o: $(top_srcdir)/include/ruby.h -ossl_pkey_dsa.o: $(top_srcdir)/include/ruby/ruby.h ossl_pkey_dsa.o: openssl_missing.h ossl_pkey_dsa.o: ossl.h ossl_pkey_dsa.o: ossl_asn1.h @@ -606,11 +606,11 @@ ossl_pkey_ec.o: $(hdrdir)/ruby/intern.h ossl_pkey_ec.o: $(hdrdir)/ruby/io.h ossl_pkey_ec.o: $(hdrdir)/ruby/missing.h ossl_pkey_ec.o: $(hdrdir)/ruby/oniguruma.h +ossl_pkey_ec.o: $(hdrdir)/ruby/ruby.h ossl_pkey_ec.o: $(hdrdir)/ruby/st.h ossl_pkey_ec.o: $(hdrdir)/ruby/subst.h ossl_pkey_ec.o: $(hdrdir)/ruby/thread.h ossl_pkey_ec.o: $(top_srcdir)/include/ruby.h -ossl_pkey_ec.o: $(top_srcdir)/include/ruby/ruby.h ossl_pkey_ec.o: openssl_missing.h ossl_pkey_ec.o: ossl.h ossl_pkey_ec.o: ossl_asn1.h @@ -641,11 +641,11 @@ ossl_pkey_rsa.o: $(hdrdir)/ruby/intern.h ossl_pkey_rsa.o: $(hdrdir)/ruby/io.h ossl_pkey_rsa.o: $(hdrdir)/ruby/missing.h ossl_pkey_rsa.o: $(hdrdir)/ruby/oniguruma.h +ossl_pkey_rsa.o: $(hdrdir)/ruby/ruby.h ossl_pkey_rsa.o: $(hdrdir)/ruby/st.h ossl_pkey_rsa.o: $(hdrdir)/ruby/subst.h ossl_pkey_rsa.o: $(hdrdir)/ruby/thread.h ossl_pkey_rsa.o: $(top_srcdir)/include/ruby.h -ossl_pkey_rsa.o: $(top_srcdir)/include/ruby/ruby.h ossl_pkey_rsa.o: openssl_missing.h ossl_pkey_rsa.o: ossl.h ossl_pkey_rsa.o: ossl_asn1.h @@ -676,11 +676,11 @@ ossl_rand.o: $(hdrdir)/ruby/intern.h ossl_rand.o: $(hdrdir)/ruby/io.h ossl_rand.o: $(hdrdir)/ruby/missing.h ossl_rand.o: $(hdrdir)/ruby/oniguruma.h +ossl_rand.o: $(hdrdir)/ruby/ruby.h ossl_rand.o: $(hdrdir)/ruby/st.h ossl_rand.o: $(hdrdir)/ruby/subst.h ossl_rand.o: $(hdrdir)/ruby/thread.h ossl_rand.o: $(top_srcdir)/include/ruby.h -ossl_rand.o: $(top_srcdir)/include/ruby/ruby.h ossl_rand.o: openssl_missing.h ossl_rand.o: ossl.h ossl_rand.o: ossl_asn1.h @@ -711,11 +711,11 @@ ossl_ssl.o: $(hdrdir)/ruby/intern.h ossl_ssl.o: $(hdrdir)/ruby/io.h ossl_ssl.o: $(hdrdir)/ruby/missing.h ossl_ssl.o: $(hdrdir)/ruby/oniguruma.h +ossl_ssl.o: $(hdrdir)/ruby/ruby.h ossl_ssl.o: $(hdrdir)/ruby/st.h ossl_ssl.o: $(hdrdir)/ruby/subst.h ossl_ssl.o: $(hdrdir)/ruby/thread.h ossl_ssl.o: $(top_srcdir)/include/ruby.h -ossl_ssl.o: $(top_srcdir)/include/ruby/ruby.h ossl_ssl.o: openssl_missing.h ossl_ssl.o: ossl.h ossl_ssl.o: ossl_asn1.h @@ -746,11 +746,11 @@ ossl_ssl_session.o: $(hdrdir)/ruby/intern.h ossl_ssl_session.o: $(hdrdir)/ruby/io.h ossl_ssl_session.o: $(hdrdir)/ruby/missing.h ossl_ssl_session.o: $(hdrdir)/ruby/oniguruma.h +ossl_ssl_session.o: $(hdrdir)/ruby/ruby.h ossl_ssl_session.o: $(hdrdir)/ruby/st.h ossl_ssl_session.o: $(hdrdir)/ruby/subst.h ossl_ssl_session.o: $(hdrdir)/ruby/thread.h ossl_ssl_session.o: $(top_srcdir)/include/ruby.h -ossl_ssl_session.o: $(top_srcdir)/include/ruby/ruby.h ossl_ssl_session.o: openssl_missing.h ossl_ssl_session.o: ossl.h ossl_ssl_session.o: ossl_asn1.h @@ -781,11 +781,11 @@ ossl_x509.o: $(hdrdir)/ruby/intern.h ossl_x509.o: $(hdrdir)/ruby/io.h ossl_x509.o: $(hdrdir)/ruby/missing.h ossl_x509.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509.o: $(hdrdir)/ruby/ruby.h ossl_x509.o: $(hdrdir)/ruby/st.h ossl_x509.o: $(hdrdir)/ruby/subst.h ossl_x509.o: $(hdrdir)/ruby/thread.h ossl_x509.o: $(top_srcdir)/include/ruby.h -ossl_x509.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509.o: openssl_missing.h ossl_x509.o: ossl.h ossl_x509.o: ossl_asn1.h @@ -816,11 +816,11 @@ ossl_x509attr.o: $(hdrdir)/ruby/intern.h ossl_x509attr.o: $(hdrdir)/ruby/io.h ossl_x509attr.o: $(hdrdir)/ruby/missing.h ossl_x509attr.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509attr.o: $(hdrdir)/ruby/ruby.h ossl_x509attr.o: $(hdrdir)/ruby/st.h ossl_x509attr.o: $(hdrdir)/ruby/subst.h ossl_x509attr.o: $(hdrdir)/ruby/thread.h ossl_x509attr.o: $(top_srcdir)/include/ruby.h -ossl_x509attr.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509attr.o: openssl_missing.h ossl_x509attr.o: ossl.h ossl_x509attr.o: ossl_asn1.h @@ -851,11 +851,11 @@ ossl_x509cert.o: $(hdrdir)/ruby/intern.h ossl_x509cert.o: $(hdrdir)/ruby/io.h ossl_x509cert.o: $(hdrdir)/ruby/missing.h ossl_x509cert.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509cert.o: $(hdrdir)/ruby/ruby.h ossl_x509cert.o: $(hdrdir)/ruby/st.h ossl_x509cert.o: $(hdrdir)/ruby/subst.h ossl_x509cert.o: $(hdrdir)/ruby/thread.h ossl_x509cert.o: $(top_srcdir)/include/ruby.h -ossl_x509cert.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509cert.o: openssl_missing.h ossl_x509cert.o: ossl.h ossl_x509cert.o: ossl_asn1.h @@ -886,11 +886,11 @@ ossl_x509crl.o: $(hdrdir)/ruby/intern.h ossl_x509crl.o: $(hdrdir)/ruby/io.h ossl_x509crl.o: $(hdrdir)/ruby/missing.h ossl_x509crl.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509crl.o: $(hdrdir)/ruby/ruby.h ossl_x509crl.o: $(hdrdir)/ruby/st.h ossl_x509crl.o: $(hdrdir)/ruby/subst.h ossl_x509crl.o: $(hdrdir)/ruby/thread.h ossl_x509crl.o: $(top_srcdir)/include/ruby.h -ossl_x509crl.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509crl.o: openssl_missing.h ossl_x509crl.o: ossl.h ossl_x509crl.o: ossl_asn1.h @@ -921,11 +921,11 @@ ossl_x509ext.o: $(hdrdir)/ruby/intern.h ossl_x509ext.o: $(hdrdir)/ruby/io.h ossl_x509ext.o: $(hdrdir)/ruby/missing.h ossl_x509ext.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509ext.o: $(hdrdir)/ruby/ruby.h ossl_x509ext.o: $(hdrdir)/ruby/st.h ossl_x509ext.o: $(hdrdir)/ruby/subst.h ossl_x509ext.o: $(hdrdir)/ruby/thread.h ossl_x509ext.o: $(top_srcdir)/include/ruby.h -ossl_x509ext.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509ext.o: openssl_missing.h ossl_x509ext.o: ossl.h ossl_x509ext.o: ossl_asn1.h @@ -956,11 +956,11 @@ ossl_x509name.o: $(hdrdir)/ruby/intern.h ossl_x509name.o: $(hdrdir)/ruby/io.h ossl_x509name.o: $(hdrdir)/ruby/missing.h ossl_x509name.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509name.o: $(hdrdir)/ruby/ruby.h ossl_x509name.o: $(hdrdir)/ruby/st.h ossl_x509name.o: $(hdrdir)/ruby/subst.h ossl_x509name.o: $(hdrdir)/ruby/thread.h ossl_x509name.o: $(top_srcdir)/include/ruby.h -ossl_x509name.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509name.o: openssl_missing.h ossl_x509name.o: ossl.h ossl_x509name.o: ossl_asn1.h @@ -991,11 +991,11 @@ ossl_x509req.o: $(hdrdir)/ruby/intern.h ossl_x509req.o: $(hdrdir)/ruby/io.h ossl_x509req.o: $(hdrdir)/ruby/missing.h ossl_x509req.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509req.o: $(hdrdir)/ruby/ruby.h ossl_x509req.o: $(hdrdir)/ruby/st.h ossl_x509req.o: $(hdrdir)/ruby/subst.h ossl_x509req.o: $(hdrdir)/ruby/thread.h ossl_x509req.o: $(top_srcdir)/include/ruby.h -ossl_x509req.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509req.o: openssl_missing.h ossl_x509req.o: ossl.h ossl_x509req.o: ossl_asn1.h @@ -1026,11 +1026,11 @@ ossl_x509revoked.o: $(hdrdir)/ruby/intern.h ossl_x509revoked.o: $(hdrdir)/ruby/io.h ossl_x509revoked.o: $(hdrdir)/ruby/missing.h ossl_x509revoked.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509revoked.o: $(hdrdir)/ruby/ruby.h ossl_x509revoked.o: $(hdrdir)/ruby/st.h ossl_x509revoked.o: $(hdrdir)/ruby/subst.h ossl_x509revoked.o: $(hdrdir)/ruby/thread.h ossl_x509revoked.o: $(top_srcdir)/include/ruby.h -ossl_x509revoked.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509revoked.o: openssl_missing.h ossl_x509revoked.o: ossl.h ossl_x509revoked.o: ossl_asn1.h @@ -1061,11 +1061,11 @@ ossl_x509store.o: $(hdrdir)/ruby/intern.h ossl_x509store.o: $(hdrdir)/ruby/io.h ossl_x509store.o: $(hdrdir)/ruby/missing.h ossl_x509store.o: $(hdrdir)/ruby/oniguruma.h +ossl_x509store.o: $(hdrdir)/ruby/ruby.h ossl_x509store.o: $(hdrdir)/ruby/st.h ossl_x509store.o: $(hdrdir)/ruby/subst.h ossl_x509store.o: $(hdrdir)/ruby/thread.h ossl_x509store.o: $(top_srcdir)/include/ruby.h -ossl_x509store.o: $(top_srcdir)/include/ruby/ruby.h ossl_x509store.o: openssl_missing.h ossl_x509store.o: ossl.h ossl_x509store.o: ossl_asn1.h diff --git a/ext/pty/depend b/ext/pty/depend index f1ba0ea6a0..a1982af215 100644 --- a/ext/pty/depend +++ b/ext/pty/depend @@ -7,11 +7,11 @@ pty.o: $(hdrdir)/ruby/intern.h pty.o: $(hdrdir)/ruby/io.h pty.o: $(hdrdir)/ruby/missing.h pty.o: $(hdrdir)/ruby/oniguruma.h +pty.o: $(hdrdir)/ruby/ruby.h pty.o: $(hdrdir)/ruby/st.h pty.o: $(hdrdir)/ruby/subst.h pty.o: $(hdrdir)/ruby/util.h pty.o: $(top_srcdir)/include/ruby.h -pty.o: $(top_srcdir)/include/ruby/ruby.h pty.o: $(top_srcdir)/internal.h pty.o: pty.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/rbconfig/sizeof/depend b/ext/rbconfig/sizeof/depend index 70954240f9..1bcaa9c6f4 100644 --- a/ext/rbconfig/sizeof/depend +++ b/ext/rbconfig/sizeof/depend @@ -8,8 +8,8 @@ sizes.o: $(arch_hdrdir)/ruby/config.h sizes.o: $(hdrdir)/ruby/defines.h sizes.o: $(hdrdir)/ruby/intern.h sizes.o: $(hdrdir)/ruby/missing.h +sizes.o: $(hdrdir)/ruby/ruby.h sizes.o: $(hdrdir)/ruby/st.h sizes.o: $(hdrdir)/ruby/subst.h -sizes.o: $(top_srcdir)/include/ruby/ruby.h sizes.o: {$(VPATH)}sizes.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/readline/depend b/ext/readline/depend index db55bc2331..26777f2816 100644 --- a/ext/readline/depend +++ b/ext/readline/depend @@ -7,11 +7,11 @@ readline.o: $(hdrdir)/ruby/intern.h readline.o: $(hdrdir)/ruby/io.h readline.o: $(hdrdir)/ruby/missing.h readline.o: $(hdrdir)/ruby/oniguruma.h +readline.o: $(hdrdir)/ruby/ruby.h readline.o: $(hdrdir)/ruby/st.h readline.o: $(hdrdir)/ruby/subst.h readline.o: $(hdrdir)/ruby/thread.h readline.o: $(top_srcdir)/include/ruby.h -readline.o: $(top_srcdir)/include/ruby/ruby.h readline.o: $(top_srcdir)/internal.h readline.o: readline.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/ripper/depend b/ext/ripper/depend index 288f8076ca..64236cd592 100644 --- a/ext/ripper/depend +++ b/ext/ripper/depend @@ -53,11 +53,11 @@ ripper.o: $(hdrdir)/ruby/io.h ripper.o: $(hdrdir)/ruby/missing.h ripper.o: $(hdrdir)/ruby/oniguruma.h ripper.o: $(hdrdir)/ruby/regex.h +ripper.o: $(hdrdir)/ruby/ruby.h ripper.o: $(hdrdir)/ruby/st.h ripper.o: $(hdrdir)/ruby/subst.h ripper.o: $(hdrdir)/ruby/util.h ripper.o: $(top_srcdir)/include/ruby.h -ripper.o: $(top_srcdir)/include/ruby/ruby.h ripper.o: $(top_srcdir)/internal.h ripper.o: $(top_srcdir)/node.h ripper.o: $(top_srcdir)/regenc.h diff --git a/ext/sdbm/depend b/ext/sdbm/depend index ae0ad64978..b8f551369b 100644 --- a/ext/sdbm/depend +++ b/ext/sdbm/depend @@ -10,10 +10,10 @@ init.o: $(arch_hdrdir)/ruby/config.h init.o: $(hdrdir)/ruby/defines.h init.o: $(hdrdir)/ruby/intern.h init.o: $(hdrdir)/ruby/missing.h +init.o: $(hdrdir)/ruby/ruby.h init.o: $(hdrdir)/ruby/st.h init.o: $(hdrdir)/ruby/subst.h init.o: $(top_srcdir)/include/ruby.h -init.o: $(top_srcdir)/include/ruby/ruby.h init.o: init.c init.o: sdbm.h # AUTOGENERATED DEPENDENCIES END diff --git a/ext/socket/depend b/ext/socket/depend index a7767cb2fc..30ecfc5b52 100644 --- a/ext/socket/depend +++ b/ext/socket/depend @@ -14,12 +14,12 @@ ancdata.o: $(hdrdir)/ruby/intern.h ancdata.o: $(hdrdir)/ruby/io.h ancdata.o: $(hdrdir)/ruby/missing.h ancdata.o: $(hdrdir)/ruby/oniguruma.h +ancdata.o: $(hdrdir)/ruby/ruby.h ancdata.o: $(hdrdir)/ruby/st.h ancdata.o: $(hdrdir)/ruby/subst.h ancdata.o: $(hdrdir)/ruby/thread.h ancdata.o: $(hdrdir)/ruby/util.h ancdata.o: $(top_srcdir)/include/ruby.h -ancdata.o: $(top_srcdir)/include/ruby/ruby.h ancdata.o: $(top_srcdir)/internal.h ancdata.o: ancdata.c ancdata.o: constdefs.h @@ -33,12 +33,12 @@ basicsocket.o: $(hdrdir)/ruby/intern.h basicsocket.o: $(hdrdir)/ruby/io.h basicsocket.o: $(hdrdir)/ruby/missing.h basicsocket.o: $(hdrdir)/ruby/oniguruma.h +basicsocket.o: $(hdrdir)/ruby/ruby.h basicsocket.o: $(hdrdir)/ruby/st.h basicsocket.o: $(hdrdir)/ruby/subst.h basicsocket.o: $(hdrdir)/ruby/thread.h basicsocket.o: $(hdrdir)/ruby/util.h basicsocket.o: $(top_srcdir)/include/ruby.h -basicsocket.o: $(top_srcdir)/include/ruby/ruby.h basicsocket.o: $(top_srcdir)/internal.h basicsocket.o: basicsocket.c basicsocket.o: constdefs.h @@ -52,12 +52,12 @@ constants.o: $(hdrdir)/ruby/intern.h constants.o: $(hdrdir)/ruby/io.h constants.o: $(hdrdir)/ruby/missing.h constants.o: $(hdrdir)/ruby/oniguruma.h +constants.o: $(hdrdir)/ruby/ruby.h constants.o: $(hdrdir)/ruby/st.h constants.o: $(hdrdir)/ruby/subst.h constants.o: $(hdrdir)/ruby/thread.h constants.o: $(hdrdir)/ruby/util.h constants.o: $(top_srcdir)/include/ruby.h -constants.o: $(top_srcdir)/include/ruby/ruby.h constants.o: $(top_srcdir)/internal.h constants.o: constants.c constants.o: constdefs.c @@ -72,12 +72,12 @@ ifaddr.o: $(hdrdir)/ruby/intern.h ifaddr.o: $(hdrdir)/ruby/io.h ifaddr.o: $(hdrdir)/ruby/missing.h ifaddr.o: $(hdrdir)/ruby/oniguruma.h +ifaddr.o: $(hdrdir)/ruby/ruby.h ifaddr.o: $(hdrdir)/ruby/st.h ifaddr.o: $(hdrdir)/ruby/subst.h ifaddr.o: $(hdrdir)/ruby/thread.h ifaddr.o: $(hdrdir)/ruby/util.h ifaddr.o: $(top_srcdir)/include/ruby.h -ifaddr.o: $(top_srcdir)/include/ruby/ruby.h ifaddr.o: $(top_srcdir)/internal.h ifaddr.o: constdefs.h ifaddr.o: ifaddr.c @@ -91,12 +91,12 @@ init.o: $(hdrdir)/ruby/intern.h init.o: $(hdrdir)/ruby/io.h init.o: $(hdrdir)/ruby/missing.h init.o: $(hdrdir)/ruby/oniguruma.h +init.o: $(hdrdir)/ruby/ruby.h init.o: $(hdrdir)/ruby/st.h init.o: $(hdrdir)/ruby/subst.h init.o: $(hdrdir)/ruby/thread.h init.o: $(hdrdir)/ruby/util.h init.o: $(top_srcdir)/include/ruby.h -init.o: $(top_srcdir)/include/ruby/ruby.h init.o: $(top_srcdir)/internal.h init.o: constdefs.h init.o: init.c @@ -110,12 +110,12 @@ ipsocket.o: $(hdrdir)/ruby/intern.h ipsocket.o: $(hdrdir)/ruby/io.h ipsocket.o: $(hdrdir)/ruby/missing.h ipsocket.o: $(hdrdir)/ruby/oniguruma.h +ipsocket.o: $(hdrdir)/ruby/ruby.h ipsocket.o: $(hdrdir)/ruby/st.h ipsocket.o: $(hdrdir)/ruby/subst.h ipsocket.o: $(hdrdir)/ruby/thread.h ipsocket.o: $(hdrdir)/ruby/util.h ipsocket.o: $(top_srcdir)/include/ruby.h -ipsocket.o: $(top_srcdir)/include/ruby/ruby.h ipsocket.o: $(top_srcdir)/internal.h ipsocket.o: constdefs.h ipsocket.o: ipsocket.c @@ -129,12 +129,12 @@ option.o: $(hdrdir)/ruby/intern.h option.o: $(hdrdir)/ruby/io.h option.o: $(hdrdir)/ruby/missing.h option.o: $(hdrdir)/ruby/oniguruma.h +option.o: $(hdrdir)/ruby/ruby.h option.o: $(hdrdir)/ruby/st.h option.o: $(hdrdir)/ruby/subst.h option.o: $(hdrdir)/ruby/thread.h option.o: $(hdrdir)/ruby/util.h option.o: $(top_srcdir)/include/ruby.h -option.o: $(top_srcdir)/include/ruby/ruby.h option.o: $(top_srcdir)/internal.h option.o: constdefs.h option.o: option.c @@ -148,12 +148,12 @@ raddrinfo.o: $(hdrdir)/ruby/intern.h raddrinfo.o: $(hdrdir)/ruby/io.h raddrinfo.o: $(hdrdir)/ruby/missing.h raddrinfo.o: $(hdrdir)/ruby/oniguruma.h +raddrinfo.o: $(hdrdir)/ruby/ruby.h raddrinfo.o: $(hdrdir)/ruby/st.h raddrinfo.o: $(hdrdir)/ruby/subst.h raddrinfo.o: $(hdrdir)/ruby/thread.h raddrinfo.o: $(hdrdir)/ruby/util.h raddrinfo.o: $(top_srcdir)/include/ruby.h -raddrinfo.o: $(top_srcdir)/include/ruby/ruby.h raddrinfo.o: $(top_srcdir)/internal.h raddrinfo.o: constdefs.h raddrinfo.o: raddrinfo.c @@ -167,12 +167,12 @@ socket.o: $(hdrdir)/ruby/intern.h socket.o: $(hdrdir)/ruby/io.h socket.o: $(hdrdir)/ruby/missing.h socket.o: $(hdrdir)/ruby/oniguruma.h +socket.o: $(hdrdir)/ruby/ruby.h socket.o: $(hdrdir)/ruby/st.h socket.o: $(hdrdir)/ruby/subst.h socket.o: $(hdrdir)/ruby/thread.h socket.o: $(hdrdir)/ruby/util.h socket.o: $(top_srcdir)/include/ruby.h -socket.o: $(top_srcdir)/include/ruby/ruby.h socket.o: $(top_srcdir)/internal.h socket.o: constdefs.h socket.o: rubysocket.h @@ -186,12 +186,12 @@ sockssocket.o: $(hdrdir)/ruby/intern.h sockssocket.o: $(hdrdir)/ruby/io.h sockssocket.o: $(hdrdir)/ruby/missing.h sockssocket.o: $(hdrdir)/ruby/oniguruma.h +sockssocket.o: $(hdrdir)/ruby/ruby.h sockssocket.o: $(hdrdir)/ruby/st.h sockssocket.o: $(hdrdir)/ruby/subst.h sockssocket.o: $(hdrdir)/ruby/thread.h sockssocket.o: $(hdrdir)/ruby/util.h sockssocket.o: $(top_srcdir)/include/ruby.h -sockssocket.o: $(top_srcdir)/include/ruby/ruby.h sockssocket.o: $(top_srcdir)/internal.h sockssocket.o: constdefs.h sockssocket.o: rubysocket.h @@ -205,12 +205,12 @@ tcpserver.o: $(hdrdir)/ruby/intern.h tcpserver.o: $(hdrdir)/ruby/io.h tcpserver.o: $(hdrdir)/ruby/missing.h tcpserver.o: $(hdrdir)/ruby/oniguruma.h +tcpserver.o: $(hdrdir)/ruby/ruby.h tcpserver.o: $(hdrdir)/ruby/st.h tcpserver.o: $(hdrdir)/ruby/subst.h tcpserver.o: $(hdrdir)/ruby/thread.h tcpserver.o: $(hdrdir)/ruby/util.h tcpserver.o: $(top_srcdir)/include/ruby.h -tcpserver.o: $(top_srcdir)/include/ruby/ruby.h tcpserver.o: $(top_srcdir)/internal.h tcpserver.o: constdefs.h tcpserver.o: rubysocket.h @@ -224,12 +224,12 @@ tcpsocket.o: $(hdrdir)/ruby/intern.h tcpsocket.o: $(hdrdir)/ruby/io.h tcpsocket.o: $(hdrdir)/ruby/missing.h tcpsocket.o: $(hdrdir)/ruby/oniguruma.h +tcpsocket.o: $(hdrdir)/ruby/ruby.h tcpsocket.o: $(hdrdir)/ruby/st.h tcpsocket.o: $(hdrdir)/ruby/subst.h tcpsocket.o: $(hdrdir)/ruby/thread.h tcpsocket.o: $(hdrdir)/ruby/util.h tcpsocket.o: $(top_srcdir)/include/ruby.h -tcpsocket.o: $(top_srcdir)/include/ruby/ruby.h tcpsocket.o: $(top_srcdir)/internal.h tcpsocket.o: constdefs.h tcpsocket.o: rubysocket.h @@ -243,12 +243,12 @@ udpsocket.o: $(hdrdir)/ruby/intern.h udpsocket.o: $(hdrdir)/ruby/io.h udpsocket.o: $(hdrdir)/ruby/missing.h udpsocket.o: $(hdrdir)/ruby/oniguruma.h +udpsocket.o: $(hdrdir)/ruby/ruby.h udpsocket.o: $(hdrdir)/ruby/st.h udpsocket.o: $(hdrdir)/ruby/subst.h udpsocket.o: $(hdrdir)/ruby/thread.h udpsocket.o: $(hdrdir)/ruby/util.h udpsocket.o: $(top_srcdir)/include/ruby.h -udpsocket.o: $(top_srcdir)/include/ruby/ruby.h udpsocket.o: $(top_srcdir)/internal.h udpsocket.o: constdefs.h udpsocket.o: rubysocket.h @@ -262,12 +262,12 @@ unixserver.o: $(hdrdir)/ruby/intern.h unixserver.o: $(hdrdir)/ruby/io.h unixserver.o: $(hdrdir)/ruby/missing.h unixserver.o: $(hdrdir)/ruby/oniguruma.h +unixserver.o: $(hdrdir)/ruby/ruby.h unixserver.o: $(hdrdir)/ruby/st.h unixserver.o: $(hdrdir)/ruby/subst.h unixserver.o: $(hdrdir)/ruby/thread.h unixserver.o: $(hdrdir)/ruby/util.h unixserver.o: $(top_srcdir)/include/ruby.h -unixserver.o: $(top_srcdir)/include/ruby/ruby.h unixserver.o: $(top_srcdir)/internal.h unixserver.o: constdefs.h unixserver.o: rubysocket.h @@ -281,12 +281,12 @@ unixsocket.o: $(hdrdir)/ruby/intern.h unixsocket.o: $(hdrdir)/ruby/io.h unixsocket.o: $(hdrdir)/ruby/missing.h unixsocket.o: $(hdrdir)/ruby/oniguruma.h +unixsocket.o: $(hdrdir)/ruby/ruby.h unixsocket.o: $(hdrdir)/ruby/st.h unixsocket.o: $(hdrdir)/ruby/subst.h unixsocket.o: $(hdrdir)/ruby/thread.h unixsocket.o: $(hdrdir)/ruby/util.h unixsocket.o: $(top_srcdir)/include/ruby.h -unixsocket.o: $(top_srcdir)/include/ruby/ruby.h unixsocket.o: $(top_srcdir)/internal.h unixsocket.o: constdefs.h unixsocket.o: rubysocket.h diff --git a/ext/strscan/depend b/ext/strscan/depend index 1517e85cc3..324c5da2f2 100644 --- a/ext/strscan/depend +++ b/ext/strscan/depend @@ -8,9 +8,9 @@ strscan.o: $(hdrdir)/ruby/missing.h strscan.o: $(hdrdir)/ruby/oniguruma.h strscan.o: $(hdrdir)/ruby/re.h strscan.o: $(hdrdir)/ruby/regex.h +strscan.o: $(hdrdir)/ruby/ruby.h strscan.o: $(hdrdir)/ruby/st.h strscan.o: $(hdrdir)/ruby/subst.h -strscan.o: $(top_srcdir)/include/ruby/ruby.h strscan.o: $(top_srcdir)/regenc.h strscan.o: $(top_srcdir)/regint.h strscan.o: strscan.c diff --git a/ext/syslog/depend b/ext/syslog/depend index 31e6606156..d818fd80aa 100644 --- a/ext/syslog/depend +++ b/ext/syslog/depend @@ -4,9 +4,9 @@ syslog.o: $(arch_hdrdir)/ruby/config.h syslog.o: $(hdrdir)/ruby/defines.h syslog.o: $(hdrdir)/ruby/intern.h syslog.o: $(hdrdir)/ruby/missing.h +syslog.o: $(hdrdir)/ruby/ruby.h syslog.o: $(hdrdir)/ruby/st.h syslog.o: $(hdrdir)/ruby/subst.h syslog.o: $(hdrdir)/ruby/util.h -syslog.o: $(top_srcdir)/include/ruby/ruby.h syslog.o: syslog.c # AUTOGENERATED DEPENDENCIES END diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb index b14bd48fcf..c739dc97a2 100644 --- a/ext/win32/lib/win32/registry.rb +++ b/ext/win32/lib/win32/registry.rb @@ -174,12 +174,20 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr FormatMessageW = Kernel32.extern "int FormatMessageW(int, void *, int, int, void *, int, void *)", :stdcall def initialize(code) @code = code - msg = WCHAR_NUL * 1024 - len = FormatMessageW.call(0x1200, 0, code, 0, msg, 1024, 0) - msg = msg.byteslice(0, len * WCHAR_SIZE) - msg.delete!(WCHAR_CR) - msg.chomp! - super msg.encode(LOCALE) + buff = WCHAR_NUL * 1024 + lang = 0 + begin + len = FormatMessageW.call(0x1200, 0, code, lang, buff, 1024, 0) + msg = buff.byteslice(0, len * WCHAR_SIZE) + msg.delete!(WCHAR_CR) + msg.chomp! + msg.encode!(LOCALE) + rescue EncodingError + raise unless lang == 0 + lang = 0x0409 # en_US + retry + end + super msg end attr_reader :code end @@ -315,6 +315,38 @@ rb_str_normalize_ospath(const char *ptr, long len) return str; } + +static int +ignored_char_p(const char *p, const char *e, rb_encoding *enc) +{ + unsigned char c; + if (p+3 > e) return 0; + switch ((unsigned char)*p) { + case 0xe2: + switch ((unsigned char)p[1]) { + case 0x80: + c = (unsigned char)p[2]; + /* c >= 0x200c && c <= 0x200f */ + if (c >= 0x8c && c <= 0x8f) return 3; + /* c >= 0x202a && c <= 0x202e */ + if (c >= 0xaa && c <= 0xae) return 3; + return 0; + case 0x81: + c = (unsigned char)p[2]; + /* c >= 0x206a && c <= 0x206f */ + if (c >= 0xaa && c <= 0xaf) return 3; + return 0; + } + break; + case 0xef: + /* c == 0xfeff */ + if ((unsigned char)p[1] == 0xbb && + (unsigned char)p[2] == 0xbf) + return 3; + break; + } + return 0; +} #endif static long @@ -3103,6 +3135,27 @@ ntfs_tail(const char *path, const char *end, rb_encoding *enc) buflen = RSTRING_LEN(result),\ pend = p + buflen) +#ifdef __APPLE__ +# define SKIPPATHSEP(p) ((*(p)) ? 1 : 0) +#else +# define SKIPPATHSEP(p) 1 +#endif + +#define BUFCOPY(srcptr, srclen) do { \ + const int skip = SKIPPATHSEP(p); \ + rb_str_set_len(result, p-buf+skip); \ + BUFCHECK(bdiff + ((srclen)+skip) >= buflen); \ + p += skip; \ + memcpy(p, (srcptr), (srclen)); \ + p += (srclen); \ +} while (0) + +#define WITH_ROOTDIFF(stmt) do { \ + long rootdiff = root - buf; \ + stmt; \ + root = buf + rootdiff; \ +} while (0) + static VALUE copy_home_path(VALUE result, const char *dir) { @@ -3374,17 +3427,25 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na case '\\': #endif if (s > b) { - long rootdiff = root - buf; - rb_str_set_len(result, p-buf+1); - BUFCHECK(bdiff + (s-b+1) >= buflen); - root = buf + rootdiff; - memcpy(++p, b, s-b); - p += s-b; + WITH_ROOTDIFF(BUFCOPY(b, s-b)); *p = '/'; } b = ++s; break; default: +#ifdef __APPLE__ + { + int n = ignored_char_p(s, fend, enc); + if (n) { + if (s > b) { + WITH_ROOTDIFF(BUFCOPY(b, s-b)); + *p = '\0'; + } + b = s += n; + break; + } + } +#endif Inc(s, fend, enc); break; } @@ -3406,10 +3467,7 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na } } #endif - rb_str_set_len(result, p-buf+1); - BUFCHECK(bdiff + (s-b) >= buflen); - memcpy(++p, b, s-b); - p += s-b; + BUFCOPY(b, s-b); rb_str_set_len(result, p-buf); } if (p == skiproot(buf, p + !!*p, enc) - 1) p++; @@ -574,7 +574,6 @@ typedef struct rb_objspace { size_t remembered_wb_unprotected_objects_limit; size_t old_objects; size_t old_objects_limit; - size_t old_objects_at_gc_start; #if RGENGC_ESTIMATE_OLDMALLOC size_t oldmalloc_increase; @@ -4915,8 +4914,6 @@ gc_marks_start(rb_objspace_t *objspace, int full_mark) gc_stat_transition(objspace, gc_stat_marking); #if USE_RGENGC - objspace->rgengc.old_objects_at_gc_start = objspace->rgengc.old_objects; - if (full_mark) { #if GC_ENABLE_INCREMENTAL_MARK objspace->rincgc.step_slots = (objspace->marked_slots * 2) / ((objspace->rincgc.pooled_slots / HEAP_OBJ_LIMIT) + 1); @@ -969,22 +969,48 @@ rb_hash_index(VALUE hash, VALUE value) return rb_hash_key(hash, value); } +/* + * delete a specified entry a given key. + * if there is the corresponding entry, return a value of the entry. + * if there is no corresponding entry, return Qundef. + */ VALUE -rb_hash_delete(VALUE hash, VALUE key) +rb_hash_delete_entry(VALUE hash, VALUE key) { st_data_t ktmp = (st_data_t)key, val; - if (!RHASH(hash)->ntbl) - return Qundef; - if (RHASH_ITER_LEV(hash) > 0) { - if (st_delete_safe(RHASH(hash)->ntbl, &ktmp, &val, (st_data_t)Qundef)) { - FL_SET(hash, HASH_DELETED); - return (VALUE)val; - } + if (!RHASH(hash)->ntbl) { + return Qundef; } - else if (st_delete(RHASH(hash)->ntbl, &ktmp, &val)) + else if (RHASH_ITER_LEV(hash) > 0 && + (st_delete_safe(RHASH(hash)->ntbl, &ktmp, &val, (st_data_t)Qundef))) { + FL_SET(hash, HASH_DELETED); return (VALUE)val; - return Qundef; + } + else if (st_delete(RHASH(hash)->ntbl, &ktmp, &val)) { + return (VALUE)val; + } + else { + return Qundef; + } +} + +/* + * delete a specified entry by a given key. + * if there is the corresponding entry, return a value of the entry. + * if there is no corresponding entry, return Qnil. + */ +VALUE +rb_hash_delete(VALUE hash, VALUE key) +{ + VALUE deleted_value = rb_hash_delete_entry(hash, key); + + if (deleted_value != Qundef) { /* likely pass */ + return deleted_value; + } + else { + return Qnil; + } } /* @@ -1011,12 +1037,19 @@ rb_hash_delete_m(VALUE hash, VALUE key) VALUE val; rb_hash_modify_check(hash); - val = rb_hash_delete(hash, key); - if (val != Qundef) return val; - if (rb_block_given_p()) { - return rb_yield(key); + val = rb_hash_delete_entry(hash, key); + + if (val != Qundef) { + return val; + } + else { + if (rb_block_given_p()) { + return rb_yield(key); + } + else { + return Qnil; + } } - return Qnil; } struct shift_var { @@ -1063,7 +1096,7 @@ rb_hash_shift(VALUE hash) else { rb_hash_foreach(hash, shift_i_safe, (VALUE)&var); if (var.key != Qundef) { - rb_hash_delete(hash, var.key); + rb_hash_delete_entry(hash, var.key); return rb_assoc_new(var.key, var.val); } } @@ -1944,10 +1977,17 @@ hash_equal(VALUE hash1, VALUE hash2, int eql) if (!rb_respond_to(hash2, idTo_hash)) { return Qfalse; } - if (eql) - return rb_eql(hash2, hash1); - else + if (eql) { + if (rb_eql(hash2, hash1)) { + return Qtrue; + } + else { + return Qfalse; + } + } + else { return rb_equal(hash2, hash1); + } } if (RHASH_SIZE(hash1) != RHASH_SIZE(hash2)) return Qfalse; diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 6f0003746a..cd03125990 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -130,14 +130,14 @@ typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1]; #define PRIuVALUE PRIuPTR #define PRIxVALUE PRIxPTR #define PRIXVALUE PRIXPTR -#define PRIsVALUE PRIiPTR""RUBY_PRI_VALUE_MARK +#define PRIsVALUE PRIiPTR"" RUBY_PRI_VALUE_MARK #else #define PRIdVALUE PRI_VALUE_PREFIX"d" #define PRIoVALUE PRI_VALUE_PREFIX"o" #define PRIuVALUE PRI_VALUE_PREFIX"u" #define PRIxVALUE PRI_VALUE_PREFIX"x" #define PRIXVALUE PRI_VALUE_PREFIX"X" -#define PRIsVALUE PRI_VALUE_PREFIX"i"RUBY_PRI_VALUE_MARK +#define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK #endif #ifndef PRI_VALUE_PREFIX # define PRI_VALUE_PREFIX "" @@ -973,7 +973,7 @@ struct rb_data_type_struct { void *reserved[2]; /* For future extension. This array *must* be filled with ZERO. */ } function; - void *const reserved; + const rb_data_type_t *parent; void *data; /* This area can be used for any purpose by a programmer who define the type. */ VALUE flags; /* FL_WB_PROTECTED */ @@ -981,6 +981,7 @@ struct rb_data_type_struct { #define HAVE_TYPE_RB_DATA_TYPE_T 1 #define HAVE_RB_DATA_TYPE_T_FUNCTION 1 +#define HAVE_RB_DATA_TYPE_T_PARENT 1 struct RTypedData { struct RBasic basic; @@ -1009,6 +1010,7 @@ typedef void (*RUBY_DATA_FUNC)(void*); #endif VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC); VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *); +int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent); int rb_typeddata_is_kind_of(VALUE, const rb_data_type_t *); void *rb_check_typeddata(VALUE, const rb_data_type_t *); #define Check_TypedStruct(v,t) rb_check_typeddata((VALUE)(v),(t)) diff --git a/internal.h b/internal.h index df93632769..10e85c77b8 100644 --- a/internal.h +++ b/internal.h @@ -1119,6 +1119,9 @@ int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data); VALUE rb_str_normalize_ospath(const char *ptr, long len); #endif +/* hash.c (export) */ +VALUE rb_hash_delete_entry(VALUE hash, VALUE key); + /* io.c (export) */ void rb_maygvl_fd_fix_cloexec(int fd); diff --git a/lib/open-uri.rb b/lib/open-uri.rb index 829759ab7c..e49a09b192 100644 --- a/lib/open-uri.rb +++ b/lib/open-uri.rb @@ -295,10 +295,12 @@ module OpenURI http.verify_mode = options[:ssl_verify_mode] || OpenSSL::SSL::VERIFY_PEER store = OpenSSL::X509::Store.new if options[:ssl_ca_cert] - if File.directory? options[:ssl_ca_cert] - store.add_path options[:ssl_ca_cert] - else - store.add_file options[:ssl_ca_cert] + Array(options[:ssl_ca_cert]).each do |cert| + if File.directory? cert + store.add_path cert + else + store.add_file cert + end end else store.set_default_paths @@ -680,7 +682,7 @@ module OpenURI # # [:ssl_ca_cert] # Synopsis: - # :ssl_ca_cert=>filename + # :ssl_ca_cert=>filename or an Array of filenames # # :ssl_ca_cert is used to specify CA certificate for SSL. # If it is given, default certificates are not used. diff --git a/lib/rubygems/compatibility.rb b/lib/rubygems/compatibility.rb index d06ade1fa6..6a00a199f9 100644 --- a/lib/rubygems/compatibility.rb +++ b/lib/rubygems/compatibility.rb @@ -20,8 +20,7 @@ if Gem::GEM_PRELUDE_SUCKAGE and defined?(Gem::QuickLoader) then $LOADED_FEATURES.delete Gem::QuickLoader.path_to_full_rubygems_library - if $LOADED_FEATURES.any? do |path| path.end_with? '/rubygems.rb' end then - # TODO path does not exist here + if path = $LOADED_FEATURES.find {|n| n.end_with? '/rubygems.rb'} then raise LoadError, "another rubygems is already loaded from #{path}" end diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 8ccaa962b8..ab1cd92270 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -2456,8 +2456,8 @@ class Gem::Specification < Gem::BasicSpecification extend Gem::UserInteraction normalize - nil_attributes = self.class.non_nil_attributes.find_all do |name| - instance_variable_get("@#{name}").nil? + nil_attributes = self.class.non_nil_attributes.find_all do |attrname| + instance_variable_get("@#{attrname}").nil? end unless nil_attributes.empty? then diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb index bacd90382d..5c134e5924 100644 --- a/lib/uri/generic.rb +++ b/lib/uri/generic.rb @@ -543,7 +543,7 @@ module URI # if properly formatted as 'user:password' def split_userinfo(ui) return nil, nil unless ui - user, password = ui.split(/:/, 2) + user, password = ui.split(':'.freeze, 2) return user, password end @@ -695,13 +695,7 @@ module URI # see also URI::Generic.port= # def set_port(v) - unless !v || v.kind_of?(Fixnum) - if v.empty? - v = nil - else - v = v.to_i - end - end + v = v.empty? ? nil : v.to_i unless !v || v.kind_of?(Fixnum) @port = v end protected :set_port @@ -768,13 +762,14 @@ module URI # If scheme is ftp, path may be relative. # See RFC 1738 section 3.2.2, and RFC 2396. - if @scheme && @scheme != "ftp" - if v && v != '' && parser.regexp[:ABS_PATH] !~ v + if @scheme && @scheme != "ftp".freeze + if v && v != ''.freeze && parser.regexp[:ABS_PATH] !~ v raise InvalidComponentError, "bad component(expected absolute path component): #{v}" end else - if v && v != '' && parser.regexp[:ABS_PATH] !~ v && parser.regexp[:REL_PATH] !~ v + if v && v != ''.freeze && parser.regexp[:ABS_PATH] !~ v && + parser.regexp[:REL_PATH] !~ v raise InvalidComponentError, "bad component(expected relative path component): #{v}" end @@ -849,7 +844,7 @@ module URI x = v.to_str v = x.dup if x.equal? v v.encode!(Encoding::UTF_8) rescue nil - v.delete!("\t\r\n") + v.delete!("\t\r\n".freeze) v.force_encoding(Encoding::ASCII_8BIT) v.gsub!(/(?!%\h\h|[!$-&(-;=?-_a-~])./n.freeze){'%%%02X'.freeze % $&.ord} v.force_encoding(Encoding::US_ASCII) @@ -939,9 +934,9 @@ module URI x = v.to_str v = x.dup if x.equal? v v.encode!(Encoding::UTF_8) rescue nil - v.delete!("\t\r\n") + v.delete!("\t\r\n".freeze) v.force_encoding(Encoding::ASCII_8BIT) - v.gsub!(/(?!%\h\h|[!-~])./n){'%%%02X' % $&.ord} + v.gsub!(/(?!%\h\h|[!-~])./n){'%%%02X'.freeze % $&.ord} v.force_encoding(Encoding::US_ASCII) @fragment = v end diff --git a/lib/uri/rfc3986_parser.rb b/lib/uri/rfc3986_parser.rb index 946f374698..3923b0699c 100644 --- a/lib/uri/rfc3986_parser.rb +++ b/lib/uri/rfc3986_parser.rb @@ -4,6 +4,11 @@ module URI # this regexp is modified not to host is not empty string RFC3986_URI = /\A(?<URI>(?<scheme>[A-Za-z][+\-.0-9A-Za-z]*):(?<hier-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h+\.[!$&-.0-;=A-Z_a-z~]+))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])+))?(?::(?<port>\d*))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*))*)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+)(?:\/\g<segment>)*)?)|(?<path-rootless>\g<segment-nz>(?:\/\g<segment>)*)|(?<path-empty>))(?:\?(?<query>[^#]*))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*))?)\z/ RFC3986_relative_ref = /\A(?<relative-ref>(?<relative-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*)@)?(?<host>(?<IP-literal>\[(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h+\.[!$&-.0-;=A-Z_a-z~]+)\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])+))?(?::(?<port>\d*))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*))*)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+)(?:\/\g<segment>)*)?)|(?<path-noscheme>(?<segment-nz-nc>(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])+)(?:\/\g<segment>)*)|(?<path-empty>))(?:\?(?<query>[^#]*))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*))?)\z/ + attr_reader :regexp + + def initialize + @regexp = default_regexp.each_value(&:freeze).freeze + end def split(uri) #:nodoc: begin @@ -11,42 +16,52 @@ module URI rescue NoMethodError raise InvalidURIError, "bad URI(is not URI?): #{uri}" end - unless uri.ascii_only? + uri.ascii_only? or raise InvalidURIError, "URI must be ascii only #{uri.dump}" - end if m = RFC3986_URI.match(uri) - ary = [] - ary << m["scheme"] - if m["path-rootless"] # opaque - ary << nil # userinfo - ary << nil # host - ary << nil # port - ary << nil # registry - ary << nil # path - ary << m["path-rootless"] - ary[-1] << '?' << m["query"] if m["query"] - ary << nil # query - ary << m["fragment"] + query = m["query".freeze] + scheme = m["scheme".freeze] + opaque = m["path-rootless".freeze] + if opaque + opaque << "?#{query}" if query + [ scheme, + nil, # userinfo + nil, # host + nil, # port + nil, # registry + nil, # path + opaque, + nil, # query + m["fragment".freeze] + ] else # normal - ary << m["userinfo"] - ary << m["host"] - ary << m["port"] - ary << nil # registry - ary << (m["path-abempty"] || m["path-absolute"] || m["path-empty"]) - ary << nil # opaque - ary << m["query"] - ary << m["fragment"] + [ scheme, + m["userinfo".freeze], + m["host".freeze], + m["port".freeze], + nil, # registry + (m["path-abempty".freeze] || + m["path-absolute".freeze] || + m["path-empty".freeze]), + nil, # opaque + query, + m["fragment".freeze] + ] end elsif m = RFC3986_relative_ref.match(uri) - ary = [nil] - ary << m["userinfo"] - ary << m["host"] - ary << m["port"] - ary << nil # registry - ary << (m["path-abempty"] || m["path-absolute"] || m["path-noscheme"] || m["path-empty"]) - ary << nil # opaque - ary << m["query"] - ary << m["fragment"] + [ nil, # scheme + m["userinfo".freeze], + m["host".freeze], + m["port".freeze], + nil, # registry, + (m["path-abempty".freeze] || + m["path-absolute".freeze] || + m["path-noscheme".freeze] || + m["path-empty".freeze]), + nil, # opaque + m["query".freeze], + m["fragment".freeze] + ] else raise InvalidURIError, "bad URI(is not URI?): #{uri}" end @@ -55,11 +70,11 @@ module URI def parse(uri) # :nodoc: scheme, userinfo, host, port, registry, path, opaque, query, fragment = self.split(uri) - - if scheme && URI.scheme_list.include?(scheme.upcase) - URI.scheme_list[scheme.upcase].new(scheme, userinfo, host, port, - registry, path, opaque, query, - fragment, self) + scheme_list = URI.scheme_list + if scheme && scheme_list.include?(uc = scheme.upcase) + scheme_list[uc].new(scheme, userinfo, host, port, + registry, path, opaque, query, + fragment, self) else Generic.new(scheme, userinfo, host, port, registry, path, opaque, query, @@ -78,7 +93,9 @@ module URI @@to_s.bind(self).call end - def regexp + private + + def default_regexp # :nodoc: { SCHEME: /\A[A-Za-z][A-Za-z0-9+\-.]*\z/, USERINFO: /\A(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*\z/, @@ -92,8 +109,6 @@ module URI } end - private - def convert_to_uri(uri) if uri.is_a?(URI::Generic) uri @@ -113,6 +113,7 @@ struct local_vars { struct vtable *args; struct vtable *vars; struct vtable *used; + struct vtable *past; struct local_vars *prev; stack_type cmdargs; }; @@ -8827,6 +8828,17 @@ match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); } +static int +past_dvar_p(struct parser_params *parser, ID id) +{ + struct vtable *past = lvtbl->past; + while (past) { + if (vtable_included(past, id)) return 1; + past = past->prev; + } + return 0; +} + static NODE* gettable_gen(struct parser_params *parser, ID id) { @@ -8860,6 +8872,9 @@ gettable_gen(struct parser_params *parser, ID id) } return NEW_LVAR(id); } + if (!in_defined && RTEST(ruby_verbose) && past_dvar_p(parser, id)) { + rb_warningV("possible reference to past scope - %"PRIsVALUE, rb_id2str(id)); + } /* method call without arguments */ return NEW_VCALL(id); case ID_GLOBAL: @@ -9978,6 +9993,7 @@ local_push_gen(struct parser_params *parser, int inherit_dvars) local->used = !(inherit_dvars && (ifndef_ripper(compile_for_eval || e_option_supplied(parser))+0)) && RTEST(ruby_verbose) ? vtable_alloc(0) : 0; + local->past = 0; local->cmdargs = cmdarg_stack; cmdarg_stack = 0; lvtbl = local; @@ -9991,6 +10007,11 @@ local_pop_gen(struct parser_params *parser) warn_unused_var(parser, lvtbl); vtable_free(lvtbl->used); } + while (lvtbl->past) { + struct vtable *past = lvtbl->past; + lvtbl->past = past->prev; + vtable_free(past); + } vtable_free(lvtbl->args); vtable_free(lvtbl->vars); cmdarg_stack = lvtbl->cmdargs; @@ -10090,10 +10111,12 @@ dyna_pop_1(struct parser_params *parser) } tmp = lvtbl->args; lvtbl->args = lvtbl->args->prev; - vtable_free(tmp); + tmp->prev = lvtbl->past; + lvtbl->past = tmp; tmp = lvtbl->vars; lvtbl->vars = lvtbl->vars->prev; - vtable_free(tmp); + tmp->prev = lvtbl->past; + lvtbl->past = tmp; } static void @@ -743,6 +743,12 @@ rb_get_next_signal(void) return sig; } +#if defined SIGSEGV || defined SIGBUS || defined SIGILL || defined SIGFPE +static const char *received_signal; +# define clear_received_signal() (void)(received_signal = 0) +#else +# define clear_received_signal() ((void)0) +#endif #if defined(USE_SIGALTSTACK) || defined(_WIN32) NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th)); @@ -792,6 +798,7 @@ check_stack_overflow(const uintptr_t addr, const ucontext_t *ctx) * place. */ th->tag = th->tag->prev; } + clear_received_signal(); ruby_thread_stack_overflow(th); } } @@ -802,6 +809,7 @@ check_stack_overflow(const void *addr) int ruby_stack_overflowed_p(const rb_thread_t *, const void *); rb_thread_t *th = ruby_current_thread; if (ruby_stack_overflowed_p(th, addr)) { + clear_received_signal(); ruby_thread_stack_overflow(th); } } @@ -886,8 +894,7 @@ sigill(int sig SIGINFO_ARG) static void check_reserved_signal_(const char *name, size_t name_len) { - static const char *received; - const char *prev = ATOMIC_PTR_EXCHANGE(received, name); + const char *prev = ATOMIC_PTR_EXCHANGE(received_signal, name); if (prev) { ssize_t RB_UNUSED_VAR(err); @@ -740,7 +740,7 @@ rb_sym2id(VALUE sym) RSYMBOL(sym)->id = id |= num; /* make it permanent object */ set_id_entry(num >>= ID_SCOPE_SHIFT, fstr, sym); - rb_hash_delete(global_symbols.dsymbol_fstr_hash, fstr); + rb_hash_delete_entry(global_symbols.dsymbol_fstr_hash, fstr); } } else { diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 8b4fca5064..237a41a35f 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -218,21 +218,22 @@ class TestIO_Console < Test::Unit::TestCase end if IO.console + def test_close + IO.console.close + assert_kind_of(IO, IO.console) + assert_nothing_raised(IOError) {IO.console.fileno} + end + def test_sync assert(IO.console.sync, "console should be unbuffered") end else + def test_close + assert_equal(["true"], run_pty("IO.console.close; p IO.console.fileno >= 0")) + end + def test_sync - r, w, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", "p IO.console.class") - rescue RuntimeError - skip $! - else - con = r.gets.chomp - Process.wait(pid) - assert_match("File", con) - ensure - r.close if r - w.close if w + assert_equal(["true"], run_pty("p IO.console.sync")) end end @@ -247,6 +248,24 @@ class TestIO_Console < Test::Unit::TestCase m.close if m s.close if s end + + def run_pty(src, n = 1) + r, w, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", src) + rescue RuntimeError + skip $! + else + result = [] + n.times {result << r.gets.chomp} + Process.wait(pid) + if block_given? + yield result + else + result + end + ensure + r.close if r + w.close if w + end end if defined?(PTY) and defined?(IO::console) class TestIO_Console < Test::Unit::TestCase diff --git a/test/rdoc/test_rdoc_generator_json_index.rb b/test/rdoc/test_rdoc_generator_json_index.rb index f25ee27d5e..06a5ddcd4a 100644 --- a/test/rdoc/test_rdoc_generator_json_index.rb +++ b/test/rdoc/test_rdoc_generator_json_index.rb @@ -148,8 +148,9 @@ class TestRDocGeneratorJsonIndex < RDoc::TestCase assert_file 'js/search_index.js' assert_file 'js/search_index.js.gz' - gzip = File.open 'js/search_index.js.gz' - json = Zlib::GzipReader.new(gzip).read + json = File.open('js/search_index.js.gz') {|gzip| + Zlib::GzipReader.new(gzip).read + } json =~ /\Avar search_data = / diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb index 4ace87c697..8334622410 100644 --- a/test/resolv/test_dns.rb +++ b/test/resolv/test_dns.rb @@ -53,7 +53,7 @@ class TestResolvDNS < Test::Unit::TestCase } } server_thread = Thread.new { - msg, (_, client_port, _, client_address) = u.recvfrom(4096) + msg, (_, client_port, _, client_address) = timeout(5) {u.recvfrom(4096)} id, word2, qdcount, ancount, nscount, arcount = msg.unpack("nnnnnn") qr = (word2 & 0x8000) >> 15 opcode = (word2 & 0x7800) >> 11 @@ -160,9 +160,11 @@ class TestResolvDNS < Test::Unit::TestCase # A rase condition here. # Another program may use the port. # But no way to prevent it. - Resolv::DNS.open(:nameserver_port => [[host, port]]) {|dns| - assert_equal([], dns.getresources("test-no-server.example.org", Resolv::DNS::Resource::IN::A)) - } + timeout(5) do + Resolv::DNS.open(:nameserver_port => [[host, port]]) {|dns| + assert_equal([], dns.getresources("test-no-server.example.org", Resolv::DNS::Resource::IN::A)) + } + end end def test_invalid_byte_comment diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 03c62da547..6184f05edb 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -237,16 +237,8 @@ class TestDir < Test::Unit::TestCase return unless File.exist?("filewithcases") assert_equal(%w"FileWithCases", Dir.glob("filewithcases"), feature5994) end - Dir.chdir(File.join(@root, "c")) do - open("FileWithCases", "w") {} - mode = File.stat(".").mode - begin - File.chmod(mode & ~0444, ".") - return if mode == File.stat(".").mode - assert_equal(%w"filewithcases", Dir.glob("filewithcases"), feature5994) - ensure - File.chmod(mode, ".") - end + Dir.chdir(@root) do + assert_equal(%w"a/FileWithCases", Dir.glob("A/filewithcases"), feature5994) end end diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index af66b68123..c629461efd 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -440,13 +440,25 @@ class TestFileExhaustive < Test::Unit::TestCase def test_expand_path assert_equal(@file, File.expand_path(File.basename(@file), File.dirname(@file))) - if /cygwin|mingw|mswin|bccwin/ =~ RUBY_PLATFORM + case RUBY_PLATFORM + when /cygwin|mingw|mswin|bccwin/ assert_equal(@file, File.expand_path(@file + " ")) assert_equal(@file, File.expand_path(@file + ".")) assert_equal(@file, File.expand_path(@file + "::$DATA")) assert_match(/\Ac:\//i, File.expand_path('c:'), '[ruby-core:31591]') assert_match(/\Ac:\//i, File.expand_path('c:foo', 'd:/bar')) assert_match(%r'\Ac:/bar/foo\z'i, File.expand_path('c:foo', 'c:/bar')) + when /darwin/ + ["\u{feff}", *"\u{2000}"..."\u{2100}"].each do |c| + file = @file + c + begin + open(file) {} + rescue + assert_equal(file, File.expand_path(file), c.dump) + else + assert_equal(@file, File.expand_path(file), c.dump) + end + end end if DRIVE assert_match(%r"\Az:/foo\z"i, File.expand_path('/foo', "z:/bar")) diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 32b05a89f7..e9e4bdc75f 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -341,6 +341,7 @@ class TestGc < Test::Unit::TestCase Process.kill("INT", pid) rescue break } sleep 5 + Process.kill("SEGV", pid) rescue nil Process.kill("KILL", pid) rescue nil end f = proc {1000.times {}} @@ -348,7 +349,10 @@ class TestGc < Test::Unit::TestCase ObjectSpace.define_finalizer(Object.new, f) end end; - assert_in_out_err(["-e", src], "", [], /Interrupt/, bug10595) + status = assert_in_out_err(["-e", src], "", [], /Interrupt/, bug10595) + unless /mswin|mingw/ =~ RUBY_PLATFORM + assert_equal("INT", Signal.signame(status.termsig)) + end end def test_verify_internal_consistency diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 70b38a2a7e..38dca83053 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -873,4 +873,8 @@ x = __ENCODING__ a = "\u{3042}" assert_warning(/#{a}/) {eval("#{a} = 1; /(?<#{a}>)/ =~ ''")} end + + def test_past_scope_variable + assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}} + end end diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 915080684b..8d3da54997 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -85,7 +85,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_verbose assert_in_out_err(["-vve", ""]) do |r, e| - assert_match(/^ruby #{RUBY_VERSION}(?:[p ]|dev).*? \[#{RUBY_PLATFORM}\]$/, r.join) + assert_match(/^ruby #{RUBY_VERSION}(?:[p ]|dev|rc).*? \[#{RUBY_PLATFORM}\]$/, r.join) assert_equal RUBY_DESCRIPTION, r.join.chomp assert_equal([], e) end @@ -139,7 +139,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_version assert_in_out_err(%w(--version)) do |r, e| - assert_match(/^ruby #{RUBY_VERSION}(?:[p ]|dev).*? \[#{RUBY_PLATFORM}\]$/, r.join) + assert_match(/^ruby #{RUBY_VERSION}(?:[p ]|dev|rc).*? \[#{RUBY_PLATFORM}\]$/, r.join) assert_equal RUBY_DESCRIPTION, r.join.chomp assert_equal([], e) end diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb index 3bdce3542c..62b4abfa1a 100644 --- a/test/test_tmpdir.rb +++ b/test/test_tmpdir.rb @@ -30,4 +30,10 @@ class TestTmpdir < Test::Unit::TestCase ENV["HOME"] = home Dir.rmdir(dir) if dir end + + def test_mktmpdir_nil + Dir.mktmpdir(nil) {|d| + assert_kind_of(String, d) + } + end end diff --git a/test/win32ole/test_win32ole_event.rb b/test/win32ole/test_win32ole_event.rb index f486749113..86004cdad7 100644 --- a/test/win32ole/test_win32ole_event.rb +++ b/test/win32ole/test_win32ole_event.rb @@ -21,85 +21,138 @@ def ado_installed? installed end +def swbemsink_avairable? + available = false + if defined?(WIN32OLE) + wmi = nil + begin + wmi = WIN32OLE.new('WbemScripting.SWbemSink') + available = true + rescue + end + end + available +end + if defined?(WIN32OLE_EVENT) class TestWIN32OLE_EVENT < Test::Unit::TestCase - unless ado_installed? + def test_s_new_exception + assert_raise(TypeError) { + WIN32OLE_EVENT.new("A") + } + end + def test_s_new_non_exist_event + dict = WIN32OLE.new('Scripting.Dictionary') + assert_raise(RuntimeError) { + WIN32OLE_EVENT.new(dict) + } + end + end + + class TestWIN32OLE_EVENT_SWbemSink < Test::Unit::TestCase + unless swbemsink_avairable? def test_dummy_for_skip_message - skip "ActiveX Data Object Library not found" + skip "'WbemScripting.SWbemSink' is not available" end else - CONNSTR="Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.;" - module ADO + def setup + @wmi = WIN32OLE.connect('winmgmts://localhost/root/cimv2') + @sws = WIN32OLE.new('WbemScripting.SWbemSink') + @event = @event1 = @event2 = "" + @sql = "SELECT * FROM __InstanceModificationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_LocalTime'" end + def message_loop - WIN32OLE_EVENT.message_loop + 2.times do + WIN32OLE_EVENT.message_loop + sleep 1 + end end def default_handler(event, *args) @event += event end - def setup - @db = WIN32OLE.new('ADODB.Connection') - if !defined?(ADO::AdStateOpen) - WIN32OLE.const_load(@db, ADO) - end - @db.connectionString = CONNSTR - @event = "" - @event2 = "" - @event3 = "" + def handler1 + @event1 = "handler1" end - def test_s_new - assert_raise(TypeError) { - WIN32OLE_EVENT.new("A") + def test_s_new_non_exist_event + assert_raise(RuntimeError) { + WIN32OLE_EVENT.new(@sws, 'XXXXX') } end - def test_s_new_without_itf - ev = WIN32OLE_EVENT.new(@db) + def test_s_new + obj = WIN32OLE_EVENT.new(@sws, 'ISWbemSinkEvents') + assert_instance_of(WIN32OLE_EVENT, obj) + obj = WIN32OLE_EVENT.new(@sws) + assert_instance_of(WIN32OLE_EVENT, obj) + end + + def test_s_new_loop + @wmi.ExecNotificationQueryAsync(@sws, @sql) + ev = WIN32OLE_EVENT.new(@sws) ev.on_event {|*args| default_handler(*args)} - @db.open - @db.close + message_loop 10.times do |i| - WIN32OLE_EVENT.new(@db) - GC.start - message_loop - @db.open + WIN32OLE_EVENT.new(@sws) message_loop - @db.close + GC.start end - assert_match(/WillConnect/, @event) + assert_match(/OnObjectReady/, @event) end def test_on_event - ev = WIN32OLE_EVENT.new(@db, 'ConnectionEvents') + @wmi.ExecNotificationQueryAsync(@sws, @sql) + ev = WIN32OLE_EVENT.new(@sws, 'ISWbemSinkEvents') ev.on_event {|*args| default_handler(*args)} - @db.open message_loop - assert_match(/WillConnect/, @event) + assert_match(/OnObjectReady/, @event) end def test_on_event_symbol - ev = WIN32OLE_EVENT.new(@db) - ev.on_event(:WillConnect) {|*args| + @wmi.ExecNotificationQueryAsync(@sws, @sql) + ev = WIN32OLE_EVENT.new(@sws) + ev.on_event(:OnObjectReady) {|*args| handler1 } - @db.open message_loop - assert_equal("handler1", @event2) + assert_equal("handler1", @event1) end - def test_on_event2 - ev = WIN32OLE_EVENT.new(@db, 'ConnectionEvents') - ev.on_event('WillConnect') {|*args| handler1} - ev.on_event('WillConnect') {|*args| handler2} - @db.open - message_loop - assert_equal("handler2", @event2) + end + end + + class TestWIN32OLE_EVENT_ADO < Test::Unit::TestCase + unless ado_installed? + def test_dummy_for_skip_message + skip "ActiveX Data Object Library not found" + end + else + CONNSTR="Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.;" + module ADO + end + def message_loop + WIN32OLE_EVENT.message_loop + end + + def default_handler(event, *args) + @event += event + end + + def setup + @db = WIN32OLE.new('ADODB.Connection') + if !defined?(ADO::AdStateOpen) + WIN32OLE.const_load(@db, ADO) + end + @db.connectionString = CONNSTR + @event = "" + @event2 = "" + @event3 = "" end - def test_on_event3 + def test_on_event2 ev = WIN32OLE_EVENT.new(@db, 'ConnectionEvents') ev.on_event('WillConnect') {|*args| handler1} ev.on_event('WillConnect') {|*args| handler2} @@ -147,15 +200,6 @@ if defined?(WIN32OLE_EVENT) } end - def test_non_exist_event - assert_raise(RuntimeError) { - WIN32OLE_EVENT.new(@db, 'XXXX') - } - dict = WIN32OLE.new('Scripting.Dictionary') - assert_raise(RuntimeError) { - WIN32OLE_EVENT.new(dict) - } - end def test_on_event_with_outargs ev = WIN32OLE_EVENT.new(@db) @@ -2080,11 +2080,12 @@ ruby_thread_stack_overflow(rb_thread_t *th) { th->raised_flag = 0; #ifdef USE_SIGALTSTACK - rb_exc_raise(sysstack_error); -#else + if (!rb_during_gc()) { + rb_exc_raise(sysstack_error); + } +#endif th->errinfo = sysstack_error; TH_JUMP_TAG(th, TAG_RAISE); -#endif } int @@ -4805,13 +4806,13 @@ recursive_pop(VALUE list, VALUE obj, VALUE paired_obj) return 0; } if (RB_TYPE_P(pair_list, T_HASH)) { - rb_hash_delete(pair_list, paired_obj); + rb_hash_delete_entry(pair_list, paired_obj); if (!RHASH_EMPTY_P(pair_list)) { return 1; /* keep hash until is empty */ } } } - rb_hash_delete(list, obj); + rb_hash_delete_entry(list, obj); return 1; } diff --git a/tool/downloader.rb b/tool/downloader.rb index c2fc638eae..e1071fcd16 100644 --- a/tool/downloader.rb +++ b/tool/downloader.rb @@ -3,13 +3,14 @@ require 'open-uri' class Downloader class GNU < self def self.download(name, *rest) - super("http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=#{name};hb=HEAD", name, *rest) + super("http://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=#{name};hb=HEAD", name, *rest) end end class RubyGems < self - def self.download(name, *rest) - super("https://rubygems.org/downloads/#{name}", name, *rest) + def self.download(name, dir = nil, ims = true, options = {}) + options[:ssl_ca_cert] = Dir.glob(File.expand_path("../lib/rubygems/ssl_certs/*.pem", File.dirname(__FILE__))) + super("https://rubygems.org/downloads/#{name}", name, dir, ims, options) end end @@ -52,7 +53,7 @@ class Downloader # Example usage: # download 'http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt', # 'UnicodeData.txt', 'enc/unicode/data' - def self.download(url, name, dir = nil, ims = true) + def self.download(url, name, dir = nil, ims = true, options = {}) file = dir ? File.join(dir, File.basename(name)) : name if ims.nil? and File.exist?(file) if $VERBOSE @@ -67,7 +68,7 @@ class Downloader $stdout.flush end begin - data = url.read(http_options(file, ims.nil? ? true : ims)) + data = url.read(options.merge(http_options(file, ims.nil? ? true : ims))) rescue OpenURI::HTTPError => http_error if http_error.message =~ /^304 / # 304 Not Modified if $VERBOSE @@ -106,7 +107,7 @@ class Downloader end true rescue => e - raise e.class, "failed to download #{name}\n#{e.message}: #{url}", e.backtrace + raise "failed to download #{name}\n#{e.message}: #{url}" end end diff --git a/tool/extlibs.rb b/tool/extlibs.rb new file mode 100755 index 0000000000..09db055983 --- /dev/null +++ b/tool/extlibs.rb @@ -0,0 +1,143 @@ +#!/usr/bin/ruby +require 'fileutils' +require 'digest' +require_relative 'downloader' + +cache_dir = ".downloaded-cache" +FileUtils.mkdir_p(cache_dir) + +def do_download(url, base, cache_dir) + Downloader.download(url, base, cache_dir, nil) +end + +def do_checksum(cache, chksums) + chksums.each do |sum| + name, sum = sum.split(/:/) + if $VERBOSE + $stdout.print "checking #{name} of #{cache} ..." + $stdout.flush + end + hd = Digest(name.upcase).file(cache).hexdigest + if hd == sum + if $VERBOSE + $stdout.puts " OK" + $stdout.flush + end + else + if $VERBOSE + $stdout.puts " NG" + $stdout.flush + end + raise "checksum mismatch: #{cache}, #{name}:#{hd}, expected #{sum}" + end + end +end + +def do_extract(cache, dir) + if $VERBOSE + $stdout.puts "extracting #{cache} into #{dir}" + $stdout.flush + end + ext = File.extname(cache) + case ext + when '.gz', '.tgz' + f = IO.popen(["gzip", "-dc", cache]) + cache = cache.chomp('.gz') + when '.bz2', '.tbz' + f = IO.popen(["bzip2", "-dc", cache]) + cache = cache.chomp('.bz2') + when '.xz', '.txz' + f = IO.popen(["xz", "-dc", cache]) + cache = cache.chomp('.xz') + else + inp = cache + end + inp ||= f.binmode + ext = File.extname(cache) + case ext + when '.tar', /\A\.t[gbx]z\z/ + pid = Process.spawn("tar", "xpf", "-", in: inp, chdir: dir) + when '.zip' + pid = Process.spawn("unzip", inp, "-d", dir) + end + f.close if f + Process.wait(pid) + $?.success? or raise "failed to extract #{cache}" +end + +def do_patch(dest, patch, args) + if $VERBOSE + $stdout.puts "applying #{patch} under #{dest}" + $stdout.flush + end + Process.wait(Process.spawn("patch", *args, in: File.join(dest, patch), chdir: dest)) + $?.success? or raise "failed to patch #{patch}" +end + +case ARGV[0] +when '--download' + mode = :download + ARGV.shift +when '--extract' + mode = :extract + ARGV.shift +when '--patch' + mode = :patch + ARGV.shift +when '--all' + mode = :all + ARGV.shift +else + mode = :all +end + +success = true +ARGV.each do |dir| + Dir.glob("#{dir}/**/extlibs") do |list| + if $VERBOSE + $stdout.puts "downloading for #{list}" + $stdout.flush + end + extracted = false + dest = File.dirname(list) + IO.foreach(list) do |line| + line.sub!(/\s*#.*/, '') + if /^\t/ =~ line + if extracted and (mode == :all or mode == :patch) + patch, *args = line.split + do_patch(dest, patch, args) + end + next + end + url, *chksums = line.split(' ') + next unless url + extracted = false + base = File.basename(url) + cache = File.join(cache_dir, base) + target = File.join(dest, base[/.*(?=\.tar(?:\.\w+)?\z)/]) + begin + case mode + when :download + do_download(url, base, cache_dir) + do_checksum(cache, chksums) + when :extract + unless File.directory?(target) + do_checksum(cache, chksums) + extracted = do_extract(cache, dest) + end + when :all + do_download(url, base, cache_dir) + unless File.directory?(target) + do_checksum(cache, chksums) + extracted = do_extract(cache, dest) + end + end + rescue => e + warn e.inspect + success = false + end + end + end +end + +exit(success) diff --git a/tool/make-snapshot b/tool/make-snapshot index 9e05e66ee9..46387cf81a 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -139,7 +139,7 @@ def package(vcs, rev, destdir, tmp = nil) when /\Atags\// url = vcs.tag($') when /\Astable\z/ - vcs.branch_list(/ruby_[0-9]*/) {|n| url = /\Aruby_\d+_\d+\z/ =~ n} + vcs.branch_list("ruby_[0-9]*") {|n| url = n[/\Aruby_\d+_\d+\z/]} url &&= vcs.branch(url) when /\A(.*)\.(.*)\.(.*)-(preview|rc)(\d+)/ prerelease = true @@ -186,9 +186,15 @@ def package(vcs, rev, destdir, tmp = nil) return end if $srcdir - Dir.glob($srcdir + "/{tool/config.{guess,sub},gems/*.gem}") do |file| + Dir.glob($srcdir + "/{tool/config.{guess,sub},gems/*.gem,.downloaded-cache/*}") do |file| puts "copying #{file}" - FileUtils.cp(file, exported + file[$srcdir.size..-1], preserve: true) + dest = exported + file[$srcdir.size..-1] + FileUtils.mkpath(File.dirname(dest)) + begin + FileUtils.ln(file, dest, force: true) + rescue SystemCallError + FileUtils.cp(file, dest, preserve: true) + end end end end @@ -280,6 +286,7 @@ def package(vcs, rev, destdir, tmp = nil) srcdir=. CHDIR=cd NULLCMD=: PATH_SEPARATOR=#{File::PATH_SEPARATOR} IFCHANGE=tool/ifchange MAKEDIRS=mkdir\ -p + RMALL=rm\ -fr MINIRUBY=#{miniruby} RUNRUBY=#{miniruby} RUBY=#{ENV["RUBY"]} @@ -289,7 +296,7 @@ def package(vcs, rev, destdir, tmp = nil) prereq] IO.popen(cmd, "w") do |f| f.puts mk - f.puts "after-update::", "prereq: after-update" + f.puts "after-update::", "clean-cache $(CLEAN_CACHE): after-update", "prereq: clean-cache $(CLEAN_CACHE)" end clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk") print "prerequisites" diff --git a/tool/redmine-backporter.rb b/tool/redmine-backporter.rb index 5d4b235e1a..121aa3e718 100755 --- a/tool/redmine-backporter.rb +++ b/tool/redmine-backporter.rb @@ -261,6 +261,9 @@ while true uri = URI(uri+".json?include=children,attachments,relations,changesets,journals") res = JSON(uri.read(openuri_options)) i = res["issue"] + unless i["changesets"] + abort "You don't have view_changesets permission" + end id = "##{i["id"]}".color(*PRIORITIES[i["priority"]["name"]]) sio = StringIO.new sio.puts <<eom @@ -283,13 +286,15 @@ eom sio.puts "== #{x["revision"]} #{x["committed_on"]} #{x["user"]["name"] rescue nil}" sio.puts x["comments"] end - sio.puts "= journals" - i["journals"].each do |x| - sio.puts "== #{x["user"]["name"]} (#{x["created_on"]})" - x["details"].each do |y| - sio.puts JSON(y) + if i["journals"] && !i["journals"].empty? + sio.puts "= journals" + i["journals"].each do |x| + sio.puts "== #{x["user"]["name"]} (#{x["created_on"]})" + x["details"].each do |y| + sio.puts JSON(y) + end + sio.puts x["notes"] end - sio.puts x["notes"] end more(sio) diff --git a/tool/update-deps b/tool/update-deps index 7710d4ae1b..2e7a7e7cc5 100755 --- a/tool/update-deps +++ b/tool/update-deps @@ -154,13 +154,21 @@ FILES_NEED_VPATH = %w[ # Multiple files with same filename. # It is not good idea to refer them using VPATH. -FILES_SAME_NAME = %w[ - include/ruby.h +# Files in FILES_SAME_NAME_INC is referenced using $(hdrdir). +# Files in FILES_SAME_NAME_TOP is referenced using $(top_srcdir). +# include/ruby.h is referenced using $(top_srcdir) because mkmf.rb replaces +# $(hdrdir)/ruby.h to $(hdrdir)/ruby/ruby.h + +FILES_SAME_NAME_INC = %w[ include/ruby/ruby.h - version.h include/ruby/version.h ] +FILES_SAME_NAME_TOP = %w[ + include/ruby.h + version.h +] + # Other source files exist in the source directory. def in_makefile(target, source) @@ -173,7 +181,8 @@ def in_makefile(target, source) when *FILES_IN_SOURCE_DIRECTORY then source2 = "$(top_srcdir)/#{source}" when *FILES_IN_BUILD_DIRECTORY then source2 = "{$(VPATH)}#{source}" # VPATH is not used now but it may changed in future. when *FILES_NEED_VPATH then source2 = "{$(VPATH)}#{source}" - when *FILES_SAME_NAME then source2 = "$(top_srcdir)/#{source}" + when *FILES_SAME_NAME_INC then source2 = "$(hdrdir)/#{source.sub(%r{\Ainclude/},'')}" + when *FILES_SAME_NAME_TOP then source2 = "$(top_srcdir)/#{source}" when 'thread_pthread.c' then source2 = '{$(VPATH)}thread_$(THREAD_MODEL).c' when 'thread_pthread.h' then source2 = '{$(VPATH)}thread_$(THREAD_MODEL).h' when %r{\A[^/]*\z} then source2 = "{$(VPATH)}#{File.basename source}" @@ -192,7 +201,8 @@ def in_makefile(target, source) when *FILES_IN_SOURCE_DIRECTORY then source2 = "$(top_srcdir)/#{source}" when *FILES_IN_BUILD_DIRECTORY then source2 = source when *FILES_NEED_VPATH then source2 = source - when *FILES_SAME_NAME then source2 = "$(top_srcdir)/#{source}" + when *FILES_SAME_NAME_INC then source2 = "$(hdrdir)/#{source.sub(%r{\Ainclude/},'')}" + when *FILES_SAME_NAME_TOP then source2 = "$(top_srcdir)/#{source}" when %r{\A\.ext/include/[^/]+/ruby/} then source2 = $' when %r{\Ainclude/ruby/} then source2 = $' when %r{\Aenc/} then source2 = source @@ -209,7 +219,8 @@ def in_makefile(target, source) when *FILES_IN_SOURCE_DIRECTORY then source2 = "$(top_srcdir)/#{source}" when *FILES_IN_BUILD_DIRECTORY then source2 = relpath when *FILES_NEED_VPATH then source2 = "{$(VPATH)}#{File.basename source}" - when *FILES_SAME_NAME then source2 = "$(top_srcdir)/#{source}" + when *FILES_SAME_NAME_INC then source2 = "$(hdrdir)/#{source.sub(%r{\Ainclude/},'')}" + when *FILES_SAME_NAME_TOP then source2 = "$(top_srcdir)/#{source}" when %r{\A\.ext/include/[^/]+/ruby/} then source2 = "$(arch_hdrdir)/ruby/#{$'}" when %r{\Ainclude/} then source2 = "$(hdrdir)/#{$'}" when %r{\A#{Regexp.escape File.dirname(target)}/extconf\.h\z} then source2 = "$(RUBY_EXTCONF_H)" diff --git a/tool/vcs.rb b/tool/vcs.rb index 71eb689f0e..66d276450e 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -161,6 +161,7 @@ class VCS def branch_list(pat) IO.popen(%W"svn ls #{branch('')}") do |f| f.each do |line| + line.chomp! line.chomp!('/') yield(line) if File.fnmatch?(pat, line) end @@ -195,7 +196,8 @@ class VCS logcmd[1, 0] = ["-C", srcdir] if srcdir logcmd << "--grep=^ *git-svn-id: .*@[0-9][0-9]*" idpat = /git-svn-id: .*?@(\d+) \S+\Z/ - last = IO.pread(logcmd)[idpat, 1] + log = IO.pread(logcmd) + last = log[idpat, 1] if path log = IO.pread(logcmd + [path]) changed = log[idpat, 1] @@ -222,10 +224,15 @@ class VCS branch(IO.pread(cmd)[/.*^(ruby_\d+_\d+)$/m, 1]) end - def branch_list(pat, &block) + def branch_list(pat) cmd = %W"git for-each-ref --format=\%(refname:short) refs/heads/#{pat}" cmd[1, 0] = ["-C", @srcdir] if @srcdir - IO.popen(cmd, &block) + IO.popen(cmd) {|f| + f.each {|line| + line.chomp! + yield line + } + } end def grep(pat, tag, *files, &block) @@ -1,11 +1,11 @@ #define RUBY_VERSION "2.2.0" -#define RUBY_RELEASE_DATE "2014-12-24" +#define RUBY_RELEASE_DATE "2014-12-25" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 24 +#define RUBY_RELEASE_DAY 25 #include "ruby/version.h" diff --git a/win32/file.c b/win32/file.c index fc10ca0068..a50d6d8638 100644 --- a/win32/file.c +++ b/win32/file.c @@ -63,13 +63,13 @@ home_dir(void) http://msdn.microsoft.com/en-us/library/windows/desktop/ms683188(v=vs.85).aspx */ - if (len = GetEnvironmentVariableW(L"HOME", NULL, 0)) { + if ((len = GetEnvironmentVariableW(L"HOME", NULL, 0)) != 0) { buffer_len = len; home_env = 1; } - else if (len = GetEnvironmentVariableW(L"HOMEDRIVE", NULL, 0)) { + else if ((len = GetEnvironmentVariableW(L"HOMEDRIVE", NULL, 0)) != 0) { buffer_len = len; - if (len = GetEnvironmentVariableW(L"HOMEPATH", NULL, 0)) { + if ((len = GetEnvironmentVariableW(L"HOMEPATH", NULL, 0)) != 0) { buffer_len += len; home_env = 2; } @@ -77,7 +77,7 @@ home_dir(void) buffer_len = 0; } } - else if (len = GetEnvironmentVariableW(L"USERPROFILE", NULL, 0)) { + else if ((len = GetEnvironmentVariableW(L"USERPROFILE", NULL, 0)) != 0) { buffer_len = len; home_env = 3; } @@ -160,7 +160,7 @@ code_page_i(st_data_t name, st_data_t idx, st_data_t arg) USHORT *table = cp->table; if (count <= idx) { unsigned int i = count; - cp->count = count = ((idx + 4) & ~31 | 28); + cp->count = count = (((idx + 4) & ~31) | 28); cp->table = table = realloc(table, count * sizeof(*table)); while (i < count) table[i++] = INVALID_CODE_PAGE; } diff --git a/win32/win32.c b/win32/win32.c index dc0232b237..34d42b0ded 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -930,7 +930,7 @@ is_command_com(const char *interp) { int i = strlen(interp) - 11; - if ((i == 0 || i > 0 && isdirsep(interp[i-1])) && + if ((i == 0 || (i > 0 && isdirsep(interp[i-1]))) && strcasecmp(interp+i, "command.com") == 0) { return 1; } @@ -998,7 +998,7 @@ join_argv(char *cmd, char *const *argv, BOOL escape, UINT cp, int backslash) char *q, *const *t; int len, n, bs, quote; - for (t = argv, q = cmd, len = 0; p = *t; t++) { + for (t = argv, q = cmd, len = 0; (p = *t) != 0; t++) { quote = 0; s = p; if (!*p || strpbrk(p, " \t\"'")) { @@ -1767,7 +1767,7 @@ w32_cmdvector(const WCHAR *cmd, char ***vec, UINT cp, rb_encoding *enc) buffer = (char *)malloc(len); if (!buffer) { do_nothing: - while (curr = cmdhead) { + while ((curr = cmdhead) != 0) { cmdhead = curr->next; if (curr->flags & NTMALLOC) free(curr->str); free(curr); @@ -1793,7 +1793,7 @@ w32_cmdvector(const WCHAR *cmd, char ***vec, UINT cp, rb_encoding *enc) cptr = buffer + (elements+1) * sizeof(char *); - while (curr = cmdhead) { + while ((curr = cmdhead) != 0) { strlcpy(cptr, curr->str, curr->len + 1); *vptr++ = cptr; cptr += curr->len + 1; @@ -4477,7 +4477,7 @@ kill(int pid, int sig) int ret = 0; DWORD err; - if (pid < 0 || pid == 0 && sig != SIGINT) { + if (pid < 0 || (pid == 0 && sig != SIGINT)) { errno = EINVAL; return -1; } @@ -5970,9 +5970,9 @@ constat_reset(HANDLE h) #define BACKGROUND_MASK (BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY) #define constat_attr_color_reverse(attr) \ - (attr) & ~(FOREGROUND_MASK | BACKGROUND_MASK) | \ + ((attr) & ~(FOREGROUND_MASK | BACKGROUND_MASK)) | \ (((attr) & FOREGROUND_MASK) << 4) | \ - (((attr) & BACKGROUND_MASK) >> 4); + (((attr) & BACKGROUND_MASK) >> 4) /* License: Ruby's */ static WORD @@ -6011,27 +6011,27 @@ constat_attr(int count, const int *seq, WORD attr, WORD default_attr, int *rever break; case 17: case 31: - attr = attr & ~(FOREGROUND_BLUE | FOREGROUND_GREEN) | FOREGROUND_RED; + attr = (attr & ~(FOREGROUND_BLUE | FOREGROUND_GREEN)) | FOREGROUND_RED; break; case 18: case 32: - attr = attr & ~(FOREGROUND_BLUE | FOREGROUND_RED) | FOREGROUND_GREEN; + attr = (attr & ~(FOREGROUND_BLUE | FOREGROUND_RED)) | FOREGROUND_GREEN; break; case 19: case 33: - attr = attr & ~FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; + attr = (attr & ~FOREGROUND_BLUE) | FOREGROUND_GREEN | FOREGROUND_RED; break; case 20: case 34: - attr = attr & ~(FOREGROUND_GREEN | FOREGROUND_RED) | FOREGROUND_BLUE; + attr = (attr & ~(FOREGROUND_GREEN | FOREGROUND_RED)) | FOREGROUND_BLUE; break; case 21: case 35: - attr = attr & ~FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED; + attr = (attr & ~FOREGROUND_GREEN) | FOREGROUND_BLUE | FOREGROUND_RED; break; case 22: case 36: - attr = attr & ~FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN; + attr = (attr & ~FOREGROUND_RED) | FOREGROUND_BLUE | FOREGROUND_GREEN; break; case 23: case 37: @@ -6042,22 +6042,22 @@ constat_attr(int count, const int *seq, WORD attr, WORD default_attr, int *rever attr &= ~(BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED); break; case 41: - attr = attr & ~(BACKGROUND_BLUE | BACKGROUND_GREEN) | BACKGROUND_RED; + attr = (attr & ~(BACKGROUND_BLUE | BACKGROUND_GREEN)) | BACKGROUND_RED; break; case 42: - attr = attr & ~(BACKGROUND_BLUE | BACKGROUND_RED) | BACKGROUND_GREEN; + attr = (attr & ~(BACKGROUND_BLUE | BACKGROUND_RED)) | BACKGROUND_GREEN; break; case 43: - attr = attr & ~BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED; + attr = (attr & ~BACKGROUND_BLUE) | BACKGROUND_GREEN | BACKGROUND_RED; break; case 44: - attr = attr & ~(BACKGROUND_GREEN | BACKGROUND_RED) | BACKGROUND_BLUE; + attr = (attr & ~(BACKGROUND_GREEN | BACKGROUND_RED)) | BACKGROUND_BLUE; break; case 45: - attr = attr & ~BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED; + attr = (attr & ~BACKGROUND_GREEN) | BACKGROUND_BLUE | BACKGROUND_RED; break; case 46: - attr = attr & ~BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN; + attr = (attr & ~BACKGROUND_RED) | BACKGROUND_BLUE | BACKGROUND_GREEN; break; case 47: attr |= BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED; |