From f9b349adb53b02ed1b3565be5b06e4881b0cdd41 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 28 Feb 2007 01:33:57 +0000 Subject: [PATCH] * Makefile.in, configure.in, */Makefile.sub (THREAD_MODEL): system specific thread model. * compile.h, regint.h, vm.h, array.c: removed unnecessary #include. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 ++++ Makefile.in | 2 + array.c | 1 - bcc32/Makefile.sub | 1 + common.mk | 92 ++++++++++++++++++++++++++++++---------------- compile.h | 1 - configure.in | 5 +++ regint.h | 1 - vm.h | 1 - win32/Makefile.sub | 1 + wince/Makefile.sub | 1 + 11 files changed, 77 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index ded918824c..eb90cc94e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Feb 28 10:33:58 2007 Nobuyoshi Nakada + + * Makefile.in, configure.in, */Makefile.sub (THREAD_MODEL): system + specific thread model. + + * compile.h, regint.h, vm.h, array.c: removed unnecessary #include. + Wed Feb 28 04:03:03 2007 Yukihiro Matsumoto * enum.c (take_i): small cosmetic / documentation patch from diff --git a/Makefile.in b/Makefile.in index 23dedbe6d6..5a65d34a04 100644 --- a/Makefile.in +++ b/Makefile.in @@ -72,6 +72,8 @@ LIBRUBYARG = @LIBRUBYARG@ LIBRUBYARG_STATIC = @LIBRUBYARG_STATIC@ LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@ +THREAD_MODEL = @THREAD_MODEL@ + PREP = @PREP@ ARCHFILE = @ARCHFILE@ SETUP = diff --git a/array.c b/array.c index caf71a2700..ac68bd4e0c 100644 --- a/array.c +++ b/array.c @@ -15,7 +15,6 @@ #include "ruby.h" #include "util.h" #include "st.h" -#include "node.h" VALUE rb_cArray; diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index 04d1328b21..fe095ad03a 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -171,6 +171,7 @@ LIBRUBY_A = $(RUBY_SO_NAME)-static.lib LIBRUBY_SO = $(RUBY_SO_NAME).dll LIBRUBY = $(RUBY_SO_NAME).lib LIBRUBYARG = $(LIBRUBY) +THREAD_MODEL = win32 PREP = miniruby$(EXEEXT) diff --git a/common.mk b/common.mk index 1caa924fc7..833f8f980e 100644 --- a/common.mk +++ b/common.mk @@ -392,20 +392,24 @@ enumerator.$(OBJEXT): {$(VPATH)}enumerator.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}st.h {$(VPATH)}vm_opts.h {$(VPATH)}rubysig.h {$(VPATH)}yarvcore.h + {$(VPATH)}st.h {$(VPATH)}vm_opts.h {$(VPATH)}rubysig.h \ + {$(VPATH)}yarvcore.h {$(VPATH)}node.h {$(VPATH)}debug.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h euc_jp.$(OBJEXT): {$(VPATH)}euc_jp.c {$(VPATH)}regenc.h \ - {$(VPATH)}oniguruma.h -eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h \ + {$(VPATH)}oniguruma.h config.h +eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_error.h {$(VPATH)}eval_intern.h \ {$(VPATH)}eval_method.h {$(VPATH)}eval_safe.h {$(VPATH)}eval_jump.h \ {$(VPATH)}ruby.h config.h {$(VPATH)}yarvcore.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}node.h {$(VPATH)}util.h \ - {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}dln.h + {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}rubysig.h \ + {$(VPATH)}st.h {$(VPATH)}dln.h {$(VPATH)}debug.h \ + {$(VPATH)}vm_opts.h {$(VPATH)}thread_$(THREAD_MODEL).h eval_load.$(OBJEXT): {$(VPATH)}eval_load.c {$(VPATH)}eval_intern.h \ {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}yarvcore.h \ - {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}dln.h + {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}dln.h {$(VPATH)}debug.h \ + {$(VPATH)}vm_opts.h {$(VPATH)}thread_$(THREAD_MODEL).h file.$(OBJEXT): {$(VPATH)}file.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}rubyio.h {$(VPATH)}rubysig.h {$(VPATH)}util.h \ @@ -413,7 +417,9 @@ file.$(OBJEXT): {$(VPATH)}file.c {$(VPATH)}ruby.h config.h \ gc.$(OBJEXT): {$(VPATH)}gc.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}node.h \ - {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}yarvcore.h + {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \ + {$(VPATH)}yarvcore.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h hash.$(OBJEXT): {$(VPATH)}hash.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}rubysig.h @@ -434,20 +440,22 @@ numeric.$(OBJEXT): {$(VPATH)}numeric.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}missing.h object.$(OBJEXT): {$(VPATH)}object.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}st.h {$(VPATH)}util.h + {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}debug.h pack.$(OBJEXT): {$(VPATH)}pack.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h parse.$(OBJEXT): {$(VPATH)}parse.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}node.h {$(VPATH)}st.h \ + {$(VPATH)}node.h {$(VPATH)}st.h {$(VPATH)}oniguruma.h \ {$(VPATH)}regex.h {$(VPATH)}util.h {$(VPATH)}lex.c prec.$(OBJEXT): {$(VPATH)}prec.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h proc.$(OBJEXT): {$(VPATH)}proc.c {$(VPATH)}eval_intern.h \ {$(VPATH)}ruby.h config.h {$(VPATH)}yarvcore.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}node.h {$(VPATH)}util.h \ - {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}dln.h + {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}gc.h \ + {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}dln.h \ + {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h process.$(OBJEXT): {$(VPATH)}process.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}yarvcore.h @@ -457,29 +465,43 @@ range.$(OBJEXT): {$(VPATH)}range.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h re.$(OBJEXT): {$(VPATH)}re.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}re.h {$(VPATH)}regex.h -regcomp.$(OBJEXT): {$(VPATH)}regcomp.c {$(VPATH)}oniguruma.h \ - {$(VPATH)}regint.h {$(VPATH)}regparse.h {$(VPATH)}regenc.h config.h + {$(VPATH)}oniguruma.h {$(VPATH)}re.h {$(VPATH)}regex.h \ + {$(VPATH)}regint.h {$(VPATH)}regenc.h {$(VPATH)}rubysig.h +regcomp.$(OBJEXT): {$(VPATH)}regcomp.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ + {$(VPATH)}oniguruma.h {$(VPATH)}regint.h {$(VPATH)}regparse.h \ + {$(VPATH)}regenc.h {$(VPATH)}rubysig.h regenc.$(OBJEXT): {$(VPATH)}regenc.c {$(VPATH)}regint.h \ - {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h {$(VPATH)}ruby.h \ + {$(VPATH)}defines.h {$(VPATH)}missing.h {$(VPATH)}intern.h \ + {$(VPATH)}rubysig.h regerror.$(OBJEXT): {$(VPATH)}regerror.c {$(VPATH)}regint.h \ - {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h \ + {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ + {$(VPATH)}intern.h {$(VPATH)}rubysig.h regexec.$(OBJEXT): {$(VPATH)}regexec.c {$(VPATH)}regint.h \ - {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h \ + {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ + {$(VPATH)}intern.h {$(VPATH)}rubysig.h regparse.$(OBJEXT): {$(VPATH)}regparse.c {$(VPATH)}oniguruma.h \ - {$(VPATH)}regint.h {$(VPATH)}regparse.h {$(VPATH)}regenc.h config.h + {$(VPATH)}regint.h {$(VPATH)}regparse.h {$(VPATH)}regenc.h config.h \ + {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ + {$(VPATH)}intern.h {$(VPATH)}rubysig.h ruby.$(OBJEXT): {$(VPATH)}ruby.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}dln.h {$(VPATH)}node.h {$(VPATH)}util.h signal.$(OBJEXT): {$(VPATH)}signal.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}rubysig.h {$(VPATH)}yarvcore.h + {$(VPATH)}rubysig.h {$(VPATH)}yarvcore.h {$(VPATH)}node.h \ + {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h sjis.$(OBJEXT): {$(VPATH)}sjis.c {$(VPATH)}regenc.h \ {$(VPATH)}oniguruma.h config.h sprintf.$(OBJEXT): {$(VPATH)}sprintf.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}vsnprintf.c -st.$(OBJEXT): {$(VPATH)}st.c config.h {$(VPATH)}st.h + {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \ + {$(VPATH)}missing/vsnprintf.c +st.$(OBJEXT): {$(VPATH)}st.c config.h {$(VPATH)}st.h {$(VPATH)}defines.h string.$(OBJEXT): {$(VPATH)}string.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}re.h {$(VPATH)}regex.h @@ -511,34 +533,40 @@ compile.$(OBJEXT): {$(VPATH)}compile.c {$(VPATH)}yarvcore.h \ {$(VPATH)}defines.h {$(VPATH)}missing.h {$(VPATH)}intern.h \ {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}rubysig.h \ {$(VPATH)}insns.inc {$(VPATH)}insns_info.inc {$(VPATH)}optinsn.inc \ - {$(VPATH)}opt_sc.inc {$(VPATH)}optunifs.inc {$(VPATH)}vm_opts.h + {$(VPATH)}opt_sc.inc {$(VPATH)}optunifs.inc {$(VPATH)}vm_opts.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h iseq.$(OBJEXT): {$(VPATH)}iseq.c {$(VPATH)}yarvcore.h {$(VPATH)}debug.h \ {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}rubysig.h \ - {$(VPATH)}gc.h {$(VPATH)}vm_opts.h \ + {$(VPATH)}gc.h {$(VPATH)}vm_opts.h config.h {$(VPATH)}node.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h\ {$(VPATH)}insns.inc {$(VPATH)}insns_info.inc vm.$(OBJEXT): {$(VPATH)}vm.c {$(VPATH)}vm.h {$(VPATH)}insnhelper.h \ {$(VPATH)}yarvcore.h {$(VPATH)}debug.h {$(VPATH)}ruby.h config.h\ - {$(VPATH)}node.h {$(VPATH)}version.h \ - {$(VPATH)}util.h {$(VPATH)}rubysig.h {$(VPATH)}dln.h \ + {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}rubysig.h {$(VPATH)}dln.h \ {$(VPATH)}vm_evalbody.ci {$(VPATH)}call_cfunc.ci \ {$(VPATH)}insns.inc {$(VPATH)}vm.inc {$(VPATH)}vmtc.inc \ - {$(VPATH)}vm_macro.inc {$(VPATH)}vm_opts.h {$(VPATH)}eval_intern.h -vm_dump.$(OBJEXT): {$(VPATH)}yarvcore.h {$(VPATH)}vm.h config.h \ - {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ + {$(VPATH)}vm_macro.inc {$(VPATH)}vm_opts.h {$(VPATH)}eval_intern.h \ + {$(VPATH)}defines.h {$(VPATH)}missing.h {$(VPATH)}intern.h \ + {$(VPATH)}gc.h {$(VPATH)}thread_$(THREAD_MODEL).h +vm_dump.$(OBJEXT): {$(VPATH)}vm_dump.c {$(VPATH)}yarvcore.h {$(VPATH)}vm.h \ + {$(VPATH)}ruby.h config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}debug.h \ - {$(VPATH)}rubysig.h {$(VPATH)}version.h {$(VPATH)}vm_opts.h + {$(VPATH)}rubysig.h {$(VPATH)}vm_opts.h {$(VPATH)}thread_$(THREAD_MODEL).h yarvcore.$(OBJEXT): {$(VPATH)}yarvcore.c {$(VPATH)}yarvcore.h \ {$(VPATH)}debug.h {$(VPATH)}ruby.h config.h {$(VPATH)}defines.h \ {$(VPATH)}missing.h {$(VPATH)}intern.h {$(VPATH)}st.h \ - {$(VPATH)}rubysig.h {$(VPATH)}node.h {$(VPATH)}gc.h {$(VPATH)}vm_opts.h + {$(VPATH)}rubysig.h {$(VPATH)}node.h {$(VPATH)}gc.h {$(VPATH)}vm_opts.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h debug.$(OBJEXT): {$(VPATH)}debug.h {$(VPATH)}ruby.h {$(VPATH)}defines.h \ {$(VPATH)}missing.h {$(VPATH)}intern.h {$(VPATH)}st.h config.h \ {$(VPATH)}st.h -blockinlining.$(OBJEXT): {$(VPATH)}ruby.h {$(VPATH)}defines.h \ +blockinlining.$(OBJEXT): {$(VPATH)}blockinlining.c \ + {$(VPATH)}ruby.h {$(VPATH)}defines.h \ {$(VPATH)}missing.h {$(VPATH)}intern.h {$(VPATH)}st.h config.h \ {$(VPATH)}node.h {$(VPATH)}yarvcore.h {$(VPATH)}rubysig.h \ - {$(VPATH)}debug.h {$(VPATH)}vm_opts.h + {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h MATZRUBY = $(MATZRUBYDIR)ruby diff --git a/compile.h b/compile.h index d2adee60d1..92c4f250dd 100644 --- a/compile.h +++ b/compile.h @@ -13,7 +13,6 @@ #ifndef _COMPILER_H_INCLUDED_ #define _COMPILER_H_INCLUDED_ -#include "version.h" #if YARVDEBUG > CPDEBUG #undef CPDEBUG diff --git a/configure.in b/configure.in index 4e6ca5273b..2f704a542e 100644 --- a/configure.in +++ b/configure.in @@ -1407,6 +1407,9 @@ if test "$install_doc" != no; then fi AC_SUBST(RDOCTARGET) +if test "$rb_with_pthread" = "yes"; then + THREAD_MODEL=pthread +fi case "$target_os" in netbsd*) CFLAGS="$CFLAGS -pipe" @@ -1476,6 +1479,7 @@ case "$target_os" in COMMON_LIBS=m # COMMON_MACROS="WIN32_LEAN_AND_MEAN=" COMMON_HEADERS="winsock2.h windows.h" + THREAD_MODEL=win32 ;; esac LIBRUBY_ALIASES='' @@ -1531,6 +1535,7 @@ AC_SUBST(COMMON_MACROS) AC_SUBST(COMMON_HEADERS) AC_SUBST(EXPORT_PREFIX) AC_SUBST(MINIOBJS) +AC_SUBST(THREAD_MODEL) MAKEFILES="Makefile `echo $FIRSTMAKEFILE | sed 's/:.*//'`" MAKEFILES="`echo $MAKEFILES`" diff --git a/regint.h b/regint.h index 138e05e0db..e364e951ed 100644 --- a/regint.h +++ b/regint.h @@ -98,7 +98,6 @@ #define xfree free #else #include "ruby.h" -#include "version.h" #include "rubysig.h" /* for DEFER_INTS, ENABLE_INTS */ #define USE_COMBINATION_EXPLOSION_CHECK /* (X*)* */ diff --git a/vm.h b/vm.h index b9d52b41d4..cccd4af365 100644 --- a/vm.h +++ b/vm.h @@ -13,7 +13,6 @@ #ifndef _VM_H_INCLUDED_ #define _VM_H_INCLUDED_ -#include "version.h" #if YARVDEBUG > VMDEBUG #undef VMDEBUG diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 49f6a7d854..011918b29a 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -183,6 +183,7 @@ LIBRUBY_A = $(RUBY_SO_NAME)-static.lib LIBRUBY_SO = $(RUBY_SO_NAME).dll LIBRUBY = $(RUBY_SO_NAME).lib LIBRUBYARG = $(LIBRUBY) +THREAD_MODEL = win32 PREP = miniruby$(EXEEXT) diff --git a/wince/Makefile.sub b/wince/Makefile.sub index b467fba4fb..f2df2c754e 100644 --- a/wince/Makefile.sub +++ b/wince/Makefile.sub @@ -170,6 +170,7 @@ LIBRUBY_A = $(RUBY_SO_NAME)-static.lib LIBRUBY_SO = $(RUBY_SO_NAME).dll LIBRUBY = $(RUBY_SO_NAME).lib LIBRUBYARG = $(LIBRUBY) +THREAD_MODEL = win32 PREP = fake.rb