diff --git a/ChangeLog b/ChangeLog index 91f9424351890c..29db0239b7bc04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Jun 10 12:07:41 2007 Nobuyoshi Nakada + + * include/ruby: moved public headers. + Sun Jun 10 10:42:04 2007 Tanaka Akira * lib/securerandom.rb: renamed from lib/secrand.rb. diff --git a/Makefile.in b/Makefile.in index 4dba2db7165779..506fcbeb443637 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,7 @@ NULLCMD = : #### Start of system configuration section. #### srcdir = @srcdir@ -VPATH = $(srcdir):$(srcdir)/missing +hdrdir = $(srcdir)/include CC = @CC@ YACC = bison @@ -32,11 +32,13 @@ RDOCTARGET = @RDOCTARGET@ EXTOUT = @EXTOUT@ RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system +arch_hdrdir = $(EXTOUT)/include/$(arch) +VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/missing empty = OUTFLAG = @OUTFLAG@$(empty) CFLAGS = @CFLAGS@ @ARCH_FLAG@ -XCFLAGS = -I. -I$(srcdir) @XCFLAGS@ +XCFLAGS = -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) @XCFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@ EXTLDFLAGS = diff --git a/array.c b/array.c index dc52e8f84c176d..a713e390ab00b3 100644 --- a/array.c +++ b/array.c @@ -12,9 +12,9 @@ **********************************************************************/ -#include "ruby.h" -#include "util.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/util.h" +#include "ruby/st.h" VALUE rb_cArray; diff --git a/bignum.c b/bignum.c index b24259e4d24c9a..d24e8ae7025828 100644 --- a/bignum.c +++ b/bignum.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include #include diff --git a/blockinlining.c b/blockinlining.c index b6563bd81c2f5b..9913b035d65a17 100644 --- a/blockinlining.c +++ b/blockinlining.c @@ -9,8 +9,8 @@ **********************************************************************/ -#include "ruby.h" -#include "node.h" +#include "ruby/ruby.h" +#include "ruby/node.h" #include "yarvcore.h" VALUE yarv_new_iseqval(VALUE node, VALUE name, VALUE file, diff --git a/class.c b/class.c index d38d64e62803fe..f881e690e417ee 100644 --- a/class.c +++ b/class.c @@ -10,10 +10,10 @@ **********************************************************************/ -#include "ruby.h" -#include "rubysig.h" -#include "node.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/signal.h" +#include "ruby/node.h" +#include "ruby/st.h" #include extern st_table *rb_class_tbl; diff --git a/common.mk b/common.mk index 444e85741950f9..4a817085404308 100644 --- a/common.mk +++ b/common.mk @@ -370,218 +370,218 @@ win32.$(OBJEXT): {$(VPATH)}win32.c ### -array.$(OBJEXT): {$(VPATH)}array.c {$(VPATH)}ruby.h config.h \ +array.$(OBJEXT): {$(VPATH)}array.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}util.h {$(VPATH)}st.h ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h \ - {$(VPATH)}oniguruma.h config.h -bignum.$(OBJEXT): {$(VPATH)}bignum.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}oniguruma.h {$(VPATH)}config.h +bignum.$(OBJEXT): {$(VPATH)}bignum.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -class.$(OBJEXT): {$(VPATH)}class.c {$(VPATH)}ruby.h config.h \ +class.$(OBJEXT): {$(VPATH)}class.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}rubysig.h {$(VPATH)}node.h {$(VPATH)}st.h -compar.$(OBJEXT): {$(VPATH)}compar.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}signal.h {$(VPATH)}node.h {$(VPATH)}st.h +compar.$(OBJEXT): {$(VPATH)}compar.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -dir.$(OBJEXT): {$(VPATH)}dir.c {$(VPATH)}ruby.h config.h \ +dir.$(OBJEXT): {$(VPATH)}dir.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}util.h -dln.$(OBJEXT): {$(VPATH)}dln.c {$(VPATH)}ruby.h config.h \ +dln.$(OBJEXT): {$(VPATH)}dln.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}dln.h dmydln.$(OBJEXT): {$(VPATH)}dmydln.c {$(VPATH)}dln.c {$(VPATH)}ruby.h \ - config.h {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ + {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}dln.h dmyext.$(OBJEXT): {$(VPATH)}dmyext.c -enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h config.h \ +enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}node.h {$(VPATH)}util.h -enumerator.$(OBJEXT): {$(VPATH)}enumerator.c {$(VPATH)}ruby.h config.h \ +enumerator.$(OBJEXT): {$(VPATH)}enumerator.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}ruby.h config.h \ +error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}st.h {$(VPATH)}vm_opts.h {$(VPATH)}rubysig.h \ + {$(VPATH)}st.h {$(VPATH)}vm_opts.h {$(VPATH)}signal.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 config.h + {$(VPATH)}oniguruma.h {$(VPATH)}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)}ruby.h {$(VPATH)}config.h {$(VPATH)}yarvcore.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}rubysig.h \ + {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}signal.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)}ruby.h {$(VPATH)}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)}debug.h \ + {$(VPATH)}signal.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 \ +file.$(OBJEXT): {$(VPATH)}file.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}rubyio.h {$(VPATH)}rubysig.h {$(VPATH)}util.h \ + {$(VPATH)}io.h {$(VPATH)}signal.h {$(VPATH)}util.h \ {$(VPATH)}dln.h -gc.$(OBJEXT): {$(VPATH)}gc.c {$(VPATH)}ruby.h config.h \ +gc.$(OBJEXT): {$(VPATH)}gc.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}node.h \ + {$(VPATH)}signal.h {$(VPATH)}st.h {$(VPATH)}node.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 \ +hash.$(OBJEXT): {$(VPATH)}hash.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}rubysig.h -inits.$(OBJEXT): {$(VPATH)}inits.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}signal.h +inits.$(OBJEXT): {$(VPATH)}inits.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -io.$(OBJEXT): {$(VPATH)}io.c {$(VPATH)}ruby.h config.h \ +io.$(OBJEXT): {$(VPATH)}io.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}rubyio.h {$(VPATH)}rubysig.h {$(VPATH)}util.h -main.$(OBJEXT): {$(VPATH)}main.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}io.h {$(VPATH)}signal.h {$(VPATH)}util.h +main.$(OBJEXT): {$(VPATH)}main.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -marshal.$(OBJEXT): {$(VPATH)}marshal.c {$(VPATH)}ruby.h config.h \ +marshal.$(OBJEXT): {$(VPATH)}marshal.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}rubyio.h {$(VPATH)}st.h {$(VPATH)}util.h -math.$(OBJEXT): {$(VPATH)}math.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}io.h {$(VPATH)}st.h {$(VPATH)}util.h +math.$(OBJEXT): {$(VPATH)}math.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -numeric.$(OBJEXT): {$(VPATH)}numeric.c {$(VPATH)}ruby.h config.h \ +numeric.$(OBJEXT): {$(VPATH)}numeric.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h \ {$(VPATH)}missing.h -object.$(OBJEXT): {$(VPATH)}object.c {$(VPATH)}ruby.h config.h \ +object.$(OBJEXT): {$(VPATH)}object.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}debug.h -pack.$(OBJEXT): {$(VPATH)}pack.c {$(VPATH)}ruby.h config.h \ +pack.$(OBJEXT): {$(VPATH)}pack.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -parse.$(OBJEXT): {$(VPATH)}parse.c {$(VPATH)}ruby.h config.h \ +parse.$(OBJEXT): {$(VPATH)}parse.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.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 \ +prec.$(OBJEXT): {$(VPATH)}prec.c {$(VPATH)}ruby.h {$(VPATH)}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)}ruby.h {$(VPATH)}config.h {$(VPATH)}yarvcore.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}gc.h \ - {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}dln.h \ + {$(VPATH)}signal.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 \ +process.$(OBJEXT): {$(VPATH)}process.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}rubysig.h {$(VPATH)}st.h {$(VPATH)}yarvcore.h -random.$(OBJEXT): {$(VPATH)}random.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}signal.h {$(VPATH)}st.h {$(VPATH)}yarvcore.h +random.$(OBJEXT): {$(VPATH)}random.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -range.$(OBJEXT): {$(VPATH)}range.c {$(VPATH)}ruby.h config.h \ +range.$(OBJEXT): {$(VPATH)}range.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h -re.$(OBJEXT): {$(VPATH)}re.c {$(VPATH)}ruby.h config.h \ +re.$(OBJEXT): {$(VPATH)}re.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.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)}regint.h {$(VPATH)}regenc.h {$(VPATH)}signal.h +regcomp.$(OBJEXT): {$(VPATH)}regcomp.c {$(VPATH)}ruby.h {$(VPATH)}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 + {$(VPATH)}regenc.h {$(VPATH)}signal.h regenc.$(OBJEXT): {$(VPATH)}regenc.c {$(VPATH)}regint.h \ {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h {$(VPATH)}ruby.h \ {$(VPATH)}defines.h {$(VPATH)}missing.h {$(VPATH)}intern.h \ - {$(VPATH)}rubysig.h + {$(VPATH)}signal.h regerror.$(OBJEXT): {$(VPATH)}regerror.c {$(VPATH)}regint.h \ - {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h \ + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h {$(VPATH)}config.h \ {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ - {$(VPATH)}intern.h {$(VPATH)}rubysig.h + {$(VPATH)}intern.h {$(VPATH)}signal.h regexec.$(OBJEXT): {$(VPATH)}regexec.c {$(VPATH)}regint.h \ - {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h \ + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h {$(VPATH)}config.h \ {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ - {$(VPATH)}intern.h {$(VPATH)}rubysig.h + {$(VPATH)}intern.h {$(VPATH)}signal.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 {$(VPATH)}config.h \ {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ - {$(VPATH)}intern.h {$(VPATH)}rubysig.h + {$(VPATH)}intern.h {$(VPATH)}signal.h regsyntax.$(OBJEXT): {$(VPATH)}regsyntax.c {$(VPATH)}oniguruma.h \ - {$(VPATH)}regint.h {$(VPATH)}regenc.h config.h \ + {$(VPATH)}regint.h {$(VPATH)}regenc.h {$(VPATH)}config.h \ {$(VPATH)}ruby.h {$(VPATH)}defines.h {$(VPATH)}missing.h -ruby.$(OBJEXT): {$(VPATH)}ruby.c {$(VPATH)}ruby.h config.h \ +ruby.$(OBJEXT): {$(VPATH)}ruby.c {$(VPATH)}ruby.h {$(VPATH)}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 \ +signal.$(OBJEXT): {$(VPATH)}signal.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ - {$(VPATH)}rubysig.h {$(VPATH)}yarvcore.h {$(VPATH)}node.h \ + {$(VPATH)}signal.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)}oniguruma.h {$(VPATH)}config.h +sprintf.$(OBJEXT): {$(VPATH)}sprintf.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.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 \ +st.$(OBJEXT): {$(VPATH)}st.c {$(VPATH)}config.h {$(VPATH)}st.h {$(VPATH)}defines.h +string.$(OBJEXT): {$(VPATH)}string.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}re.h {$(VPATH)}regex.h -struct.$(OBJEXT): {$(VPATH)}struct.c {$(VPATH)}ruby.h config.h \ +struct.$(OBJEXT): {$(VPATH)}struct.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h thread.$(OBJEXT): {$(VPATH)}thread.c {$(VPATH)}eval_intern.h \ {$(VPATH)}thread_win32.h {$(VPATH)}thread_pthread.h \ {$(VPATH)}thread_win32.ci {$(VPATH)}thread_pthread.ci \ - {$(VPATH)}ruby.h {$(VPATH)}yarvcore.h config.h \ + {$(VPATH)}ruby.h {$(VPATH)}yarvcore.h {$(VPATH)}config.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)}signal.h {$(VPATH)}st.h {$(VPATH)}dln.h cont.$(OBJEXT): {$(VPATH)}cont.c {$(VPATH)}eval_intern.h \ - {$(VPATH)}ruby.h {$(VPATH)}yarvcore.h config.h \ + {$(VPATH)}ruby.h {$(VPATH)}yarvcore.h {$(VPATH)}config.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 -time.$(OBJEXT): {$(VPATH)}time.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}signal.h {$(VPATH)}st.h {$(VPATH)}dln.h +time.$(OBJEXT): {$(VPATH)}time.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regenc.h \ - {$(VPATH)}oniguruma.h config.h + {$(VPATH)}oniguruma.h {$(VPATH)}config.h utf8.$(OBJEXT): {$(VPATH)}utf8.c {$(VPATH)}regenc.h \ - {$(VPATH)}oniguruma.h config.h -util.$(OBJEXT): {$(VPATH)}util.c {$(VPATH)}ruby.h config.h \ + {$(VPATH)}oniguruma.h {$(VPATH)}config.h +util.$(OBJEXT): {$(VPATH)}util.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}util.h -variable.$(OBJEXT): {$(VPATH)}variable.c {$(VPATH)}ruby.h config.h \ +variable.$(OBJEXT): {$(VPATH)}variable.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}node.h {$(VPATH)}st.h {$(VPATH)}util.h -version.$(OBJEXT): {$(VPATH)}version.c {$(VPATH)}ruby.h config.h \ +version.$(OBJEXT): {$(VPATH)}version.c {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}version.h compile.$(OBJEXT): {$(VPATH)}compile.c {$(VPATH)}yarvcore.h \ - {$(VPATH)}compile.h {$(VPATH)}debug.h {$(VPATH)}ruby.h config.h \ + {$(VPATH)}compile.h {$(VPATH)}debug.h {$(VPATH)}ruby.h {$(VPATH)}config.h \ {$(VPATH)}defines.h {$(VPATH)}missing.h {$(VPATH)}intern.h \ - {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}rubysig.h \ + {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}signal.h \ {$(VPATH)}insns.inc {$(VPATH)}insns_info.inc {$(VPATH)}optinsn.inc \ {$(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 config.h {$(VPATH)}node.h \ + {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}signal.h \ + {$(VPATH)}gc.h {$(VPATH)}vm_opts.h {$(VPATH)}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)}util.h {$(VPATH)}rubysig.h {$(VPATH)}dln.h \ + {$(VPATH)}yarvcore.h {$(VPATH)}debug.h {$(VPATH)}ruby.h {$(VPATH)}config.h\ + {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}signal.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 \ {$(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)}ruby.h {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}debug.h \ - {$(VPATH)}rubysig.h {$(VPATH)}vm_opts.h {$(VPATH)}thread_$(THREAD_MODEL).h + {$(VPATH)}signal.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)}debug.h {$(VPATH)}ruby.h {$(VPATH)}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)}signal.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)}missing.h {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}config.h \ {$(VPATH)}st.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)}missing.h {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}config.h \ + {$(VPATH)}node.h {$(VPATH)}yarvcore.h {$(VPATH)}signal.h \ {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \ {$(VPATH)}thread_$(THREAD_MODEL).h diff --git a/compar.c b/compar.c index 80c4c70ca686d4..78025670700cce 100644 --- a/compar.c +++ b/compar.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" VALUE rb_mComparable; diff --git a/compile.c b/compile.c index 3195a2cd7cdf58..3ce622fde9d9d7 100644 --- a/compile.c +++ b/compile.c @@ -10,8 +10,8 @@ **********************************************************************/ -#include "ruby.h" -#include "node.h" +#include "ruby/ruby.h" +#include "ruby/node.h" #include "yarvcore.h" #include "compile.h" diff --git a/configure.in b/configure.in index 22326492632bb8..f8f3b3d627f21d 100644 --- a/configure.in +++ b/configure.in @@ -216,10 +216,11 @@ AC_MINIX AC_SUBST(RM, ['rm -f']) AC_SUBST(CP, ['cp']) if $as_mkdir_p; then - AC_SUBST(MAKEDIRS, ['mkdir -p']) + MAKEDIRS='mkdir -p' else - AC_SUBST(MAKEDIRS, ['install -d']) + MAKEDIRS='install -d' fi +AC_SUBST(MAKEDIRS) dnl check for large file stuff AC_SYS_LARGEFILE @@ -1271,7 +1272,7 @@ fi AC_SUBST(MINIRUBY) AC_SUBST(PREP) AC_SUBST(RUNRUBY) -AC_SUBST(EXTOUT, [${EXTOUT-.ext}]) +AC_SUBST(EXTOUT, [${EXTOUT=.ext}]) FIRSTMAKEFILE="" LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a' @@ -1607,6 +1608,19 @@ if test "$search_path" != ""; then AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path") fi +AC_ARG_WITH(rubyhdrdir, + [ --with-ruby-hdrdir=DIR core headers in DIR [INCLUDEDIR]], + [rubyhdrdir=$withval], + [rubyhdrdir='${includedir}/ruby-${MAJOR}.${MINOR}']) + +AC_ARG_WITH(sitehdrdir, + [ --with-site-hdrdir=DIR core headers in DIR [INCLUDEDIR]], + [sitehdrdir=$withval], + [sitehdrdir='${rubyhdrdir}/site_ruby']) + +AC_SUBST(rubyhdrdir)dnl +AC_SUBST(sitehdrdir)dnl + AC_ARG_WITH(mantype, [ --with-mantype=TYPE specify man page type; TYPE is one of man and doc], [ @@ -1646,11 +1660,14 @@ AC_ARG_WITH(baseruby, ]) AC_SUBST(BASERUBY) -if test -f config.h && tr -d '\015' < confdefs.h | cmp -s config.h -; then +arch_hdrdir="${EXTOUT}/include/${arch}/ruby" +$MAKEDIRS "${arch_hdrdir}" +config_h="${arch_hdrdir}/config.h" +if test -f "${config_h}" && tr -d '\015' < confdefs.h | cmp -s "${config_h}" -; then echo "config.h unchanged" else echo "creating config.h" - tr -d '\015' < confdefs.h > config.h + tr -d '\015' < confdefs.h > "${config_h}" fi : > confdefs.h diff --git a/cont.c b/cont.c index 97a805d0abcc18..58149979ca74f6 100644 --- a/cont.c +++ b/cont.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include "yarvcore.h" #include "gc.h" #include "eval_intern.h" diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in index c9283d84b100fb..719dae7e5efb70 100644 --- a/cygwin/GNUmakefile.in +++ b/cygwin/GNUmakefile.in @@ -61,7 +61,7 @@ $(RUBY_EXP): $(LIBRUBY_A) GNUmakefile: $(srcdir)/cygwin/GNUmakefile.in ifeq (@target_os@,mingw32) -$(OBJS) $(MAINOBJ): win32/win32.h +$(OBJS) $(MAINOBJ): win32.h $(LIBRUBY_SO): $(RUBYDEF) diff --git a/debug.c b/debug.c index 683f4ec0742733..ec28be3eb8204c 100644 --- a/debug.c +++ b/debug.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include "debug.h" void diff --git a/debug.h b/debug.h index b25fa6ddce1703..66ea10883f12c4 100644 --- a/debug.h +++ b/debug.h @@ -13,8 +13,8 @@ #ifndef _DEBUG_H_INCLUDED_ #define _DEBUG_H_INCLUDED_ -#include -#include +#include "ruby/ruby.h" +#include "ruby/node.h" #define dpv(h,v) ruby_debug_value(-1, 0, h, v) #define dp(v) ruby_debug_value(-1, 0, "", v) diff --git a/dir.c b/dir.c index d0af8044798319..ecffc37f9eb9bf 100644 --- a/dir.c +++ b/dir.c @@ -12,7 +12,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include #include @@ -61,7 +61,7 @@ char *strchr(char*,char); #include -#include "util.h" +#include "ruby/util.h" #if !defined HAVE_LSTAT && !defined lstat #define lstat stat diff --git a/dln.c b/dln.c index 3dce788c310a16..1e953990d9cedd 100644 --- a/dln.c +++ b/dln.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include "dln.h" #ifdef HAVE_STDLIB_H @@ -182,8 +182,8 @@ static int dln_init_p = 0; #define INVALID_OBJECT(h) (N_MAGIC(h) != OMAGIC) -#include "util.h" -#include "st.h" +#include "ruby/util.h" +#include "ruby/st.h" static st_table *sym_tbl; static st_table *undef_tbl; diff --git a/enum.c b/enum.c index f4c649550a9634..c251141dd9b0ea 100644 --- a/enum.c +++ b/enum.c @@ -10,9 +10,9 @@ **********************************************************************/ -#include "ruby.h" -#include "node.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/node.h" +#include "ruby/util.h" VALUE rb_mEnumerable; static ID id_each, id_eqq, id_cmp; diff --git a/enumerator.c b/enumerator.c index 83cdff9c584e69..d3bb1734761495 100644 --- a/enumerator.c +++ b/enumerator.c @@ -12,7 +12,7 @@ ************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" /* * Document-class: Enumerable::Enumerator diff --git a/error.c b/error.c index c50668a69c120a..283e9c856fdf29 100644 --- a/error.c +++ b/error.c @@ -10,8 +10,8 @@ **********************************************************************/ -#include "ruby.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/st.h" #include "yarvcore.h" #include diff --git a/eval_intern.h b/eval_intern.h index 3c67ddc2f0c3fc..f17f829f17a081 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -6,10 +6,10 @@ (GET_THREAD()->passed_block = \ GC_GUARDED_PTR_REF((rb_block_t *)GET_THREAD()->cfp->lfp[0])) -#include "ruby.h" -#include "node.h" -#include "util.h" -#include "rubysig.h" +#include "ruby/ruby.h" +#include "ruby/node.h" +#include "ruby/util.h" +#include "ruby/signal.h" #include "yarvcore.h" #ifdef HAVE_STDLIB_H @@ -25,7 +25,7 @@ #include #include -#include "st.h" +#include "ruby/st.h" #include "dln.h" #ifdef __APPLE__ diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index a4b769e8cf86be..c9e7ceb2e49326 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -13,7 +13,7 @@ * */ -#include "ruby.h" +#include "ruby/ruby.h" #include #include #include @@ -22,7 +22,6 @@ #include #include #include "math.h" -#include "version.h" /* #define ENABLE_NUMERIC_STRING */ diff --git a/ext/digest/extconf.rb b/ext/digest/extconf.rb index cf9127ecc034b0..a20ca8d68f73cc 100644 --- a/ext/digest/extconf.rb +++ b/ext/digest/extconf.rb @@ -4,7 +4,7 @@ require "mkmf" $INSTALLFILES = { - "digest.h" => "$(RUBYARCHDIR)" + "digest.h" => "$(HDRDIR)" } create_makefile("digest") diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c index abfd9e8d1c81ba..74a233b52772ea 100644 --- a/ext/dl/cptr.c +++ b/ext/dl/cptr.c @@ -2,10 +2,9 @@ * $Id$ */ -#include -#include +#include +#include #include -#include /* for ruby version code */ #include "dl.h" VALUE rb_cDLCPtr; @@ -421,7 +420,7 @@ rb_dlptr_s_to_ptr(VALUE self, VALUE val) rb_io_t *fptr; FILE *fp; GetOpenFile(val, fptr); -#if RUBY_VERSION_CODE >= 190 +#if HAVE_RB_IO_STDIO_FILE fp = rb_io_stdio_file(fptr); #else fp = fptr->f; diff --git a/ext/dl/dl.c b/ext/dl/dl.c index 015e76f09e4ba8..e4bd4d41e92417 100644 --- a/ext/dl/dl.c +++ b/ext/dl/dl.c @@ -1,6 +1,5 @@ -#include -#include -#include +#include +#include #include #include "dl.h" diff --git a/ext/dl/extconf.rb b/ext/dl/extconf.rb index 99419b2d7dab26..8bac1e83fb23ef 100644 --- a/ext/dl/extconf.rb +++ b/ext/dl/extconf.rb @@ -5,7 +5,7 @@ end $INSTALLFILES = [ - ["dl.h", "$(archdir)$(target_prefix)", ""], + ["dl.h", "$(HDRDIR)"], ] $distcleanfiles << "callback.h" @@ -26,5 +26,7 @@ end if( check ) + have_func("rb_io_stdio_file", "ruby/ruby.h") + $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"] create_makefile("dl") end diff --git a/ext/extmk.rb b/ext/extmk.rb index a932a14414bb99..d4be9fc5387cf0 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -112,10 +112,12 @@ def extmake(target) Dir.chdir target top_srcdir = $top_srcdir topdir = $topdir + hdrdir = $hdrdir mk_srcdir = CONFIG["srcdir"] mk_topdir = CONFIG["topdir"] prefix = "../" * (target.count("/")+1) - $hdrdir = $top_srcdir = relative_from(top_srcdir, prefix) + $top_srcdir = relative_from(top_srcdir, prefix) + $hdrdir = relative_from(hdrdir, prefix) $topdir = prefix + $topdir $target = target $mdir = target @@ -130,8 +132,8 @@ def extmake(target) RbConfig::CONFIG["hdrdir"] = $hdrdir RbConfig::CONFIG["srcdir"] = $srcdir RbConfig::CONFIG["topdir"] = $topdir - CONFIG["hdrdir"] = ($hdrdir == top_srcdir) ? top_srcdir : "$(topdir)"+top_srcdir[2..-1] - CONFIG["srcdir"] = "$(hdrdir)/ext/#{$mdir}" + CONFIG["hdrdir"] = ($hdrdir == top_srcdir) ? top_srcdir : "$(top_srcdir)/include" + CONFIG["srcdir"] = "$(top_srcdir)/ext/#{$mdir}" CONFIG["topdir"] = $topdir begin $extconf_h = nil @@ -200,8 +202,9 @@ def extmake(target) CONFIG["srcdir"] = mk_srcdir CONFIG["topdir"] = mk_topdir CONFIG.delete("hdrdir") - $hdrdir = $top_srcdir = top_srcdir + $top_srcdir = top_srcdir $topdir = topdir + $hdrdir = hdrdir Dir.chdir dir end begin @@ -284,6 +287,7 @@ def $mflags.defined?(var) $continue = $mflags.set?(?k) if $extout $extout = '$(topdir)/'+$extout + RbConfig::CONFIG["extout"] = CONFIG["extout"] = $extout $extout_prefix = $extout ? "$(extout)$(target_prefix)/" : "" $mflags << "extout=#$extout" << "extout_prefix=#$extout_prefix" end @@ -322,10 +326,10 @@ def $mflags.defined?(var) else $ruby = '$(topdir)/miniruby' + EXEEXT end -$ruby << " -I'$(topdir)' -I'$(hdrdir)/lib'" +$ruby << " -I'$(topdir)' -I'$(top_srcdir)/lib'" $ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout -$ruby << " -I'$(hdrdir)/ext' -rpurelib.rb" -$config_h = '$(topdir)/config.h' +$ruby << " -I'$(top_srcdir)/ext' -rpurelib.rb" +$config_h = '$(arch_hdrdir)/ruby/config.h' ENV["RUBYLIB"] = "-" ENV["RUBYOPT"] = "-rpurelib.rb" @@ -404,12 +408,14 @@ def $mflags.defined?(var) FileUtils::makedirs('ext') Dir::chdir('ext') -$hdrdir = $top_srcdir = relative_from(srcdir, $topdir = "..") +hdrdir = $hdrdir +$hdrdir = ($top_srcdir = relative_from(srcdir, $topdir = "..")) + "/include" exts.each do |d| extmake(d) or abort end -$hdrdir = $top_srcdir = srcdir +$top_srcdir = srcdir $topdir = "." +$hdrdir = hdrdir extinit = Struct.new(:c, :o) { def initialize(src) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 27a4cf102edebf..b6bc0a11a51225 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -14,12 +14,12 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include #include #include -#include "st.h" -#include "intern.h" +#include "ruby/st.h" +#include "ruby/intern.h" /* * Document-class: Iconv diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c index 60e09355f0459b..07e348aa121fd8 100644 --- a/ext/json/ext/generator/generator.c +++ b/ext/json/ext/generator/generator.c @@ -1,8 +1,8 @@ /* vim: set cin et sw=4 ts=4: */ #include -#include "ruby.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/st.h" #include "unicode.h" static VALUE mJSON, mExt, mGenerator, cState, mGeneratorMethods, mObject, diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index 7448e5fb7a0f1f..3b84110374b14f 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/parser/parser.c @@ -1,9 +1,9 @@ #line 1 "parser.rl" -/* vim: set cin et sw=4 ts=4: */ +/* -*-c-*- vim: set cin et sw=4 ts=4: */ -#include "ruby.h" -#include "re.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/re.h" +#include "ruby/st.h" #include "unicode.h" #define EVIL 0x666 diff --git a/ext/json/ext/parser/parser.rl b/ext/json/ext/parser/parser.rl index 9ce8c6fc24fa30..9e2a5015ebbfa3 100644 --- a/ext/json/ext/parser/parser.rl +++ b/ext/json/ext/parser/parser.rl @@ -1,8 +1,8 @@ -/* vim: set cin et sw=4 ts=4: */ +/* -*-c-*- vim: set cin et sw=4 ts=4: */ -#include "ruby.h" -#include "re.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/re.h" +#include "ruby/st.h" #include "unicode.h" #define EVIL 0x666 diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index bc3f4fd2ed55ce..9356853e1d2cbb 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -19,6 +19,8 @@ dir_config("openssl") dir_config("kerberos") +$defs << "-DRUBY_VERSION_CODE=#{RUBY_VERSION.gsub(/\D/, '')}" + message "=== OpenSSL for Ruby configurator ===\n" ## diff --git a/ext/probeprofiler/extconf.rb b/ext/probeprofiler/extconf.rb index 31cfc85c065851..da94e654d9fdbd 100644 --- a/ext/probeprofiler/extconf.rb +++ b/ext/probeprofiler/extconf.rb @@ -1,2 +1,4 @@ require 'mkmf' +$VPATH << "$(top_srcdir)" +$INCFLAGS << " -I$(top_srcdir)" create_makefile("probeprofiler") diff --git a/ext/probeprofiler/probeprofiler.c b/ext/probeprofiler/probeprofiler.c index 9ffb2036739674..fba4d85f465ebc 100644 --- a/ext/probeprofiler/probeprofiler.c +++ b/ext/probeprofiler/probeprofiler.c @@ -1,4 +1,4 @@ -#include +#include #include static void diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 5847aff2bd39be..d89cc7d457b44e 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -1,4 +1,4 @@ -#include "config.h" +#include "ruby/config.h" #ifdef RUBY_EXTCONF_H #include RUBY_EXTCONF_H #endif @@ -25,9 +25,9 @@ #endif #include -#include "ruby.h" -#include "rubyio.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/util.h" #include #ifdef HAVE_SYS_STROPTS_H @@ -192,7 +192,7 @@ pty_exec(VALUE v) static void establishShell(int argc, VALUE *argv, struct pty_info *info) { - int i,master,slave; + int master,slave; rb_pid_t pid; char *p,*getenv(); struct passwd *pwent; @@ -240,9 +240,9 @@ establishShell(int argc, VALUE *argv, struct pty_info *info) # else /* SETGRP_VOID */ if (setpgrp(0, getpid()) == -1) rb_sys_fail("setpgrp()"); - if ((i = open("/dev/tty", O_RDONLY)) < 0) - rb_sys_fail("/dev/tty"); - else { + { + int i = open("/dev/tty", O_RDONLY); + if (i < 0) rb_sys_fail("/dev/tty"); if (ioctl(i, TIOCNOTTY, (char *)0)) perror("ioctl(TIOCNOTTY)"); close(i); diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c index e52d0da80733d2..d085158f1128e1 100644 --- a/ext/racc/cparse/cparse.c +++ b/ext/racc/cparse/cparse.c @@ -11,8 +11,7 @@ */ -#include "ruby.h" -#include "version.h" +#include "ruby/ruby.h" /* ----------------------------------------------------------------------- Important Constants @@ -65,9 +64,6 @@ static ID id_d_e_pop; #ifndef LONG2NUM # define LONG2NUM(i) INT2NUM(i) #endif -#if RUBY_VERSION_CODE >= 190 -# define HAVE_RB_BLOCK_CALL 1 -#endif static ID value_to_id _((VALUE v)); static inline long num_to_long _((VALUE n)); diff --git a/ext/racc/cparse/extconf.rb b/ext/racc/cparse/extconf.rb index dd953a7e151659..3710f6f7e74bc1 100644 --- a/ext/racc/cparse/extconf.rb +++ b/ext/racc/cparse/extconf.rb @@ -1,4 +1,5 @@ # $Id$ require 'mkmf' +have_func('rb_block_call', 'ruby/ruby.h') create_makefile 'racc/cparse' diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 12837b5ac2cb72..169a196166ed9b 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -5,7 +5,7 @@ #include RUBY_EXTCONF_H #endif -#include "config.h" +#include "ruby/config.h" #include #include #include @@ -20,9 +20,9 @@ #include #endif -#include "ruby.h" -#include "rubyio.h" -#include "rubysig.h" +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/signal.h" #ifdef HAVE_UNISTD_H #include diff --git a/ext/ripper/depend b/ext/ripper/depend index bd0f8010cf4238..f74f7f0feedba4 100644 --- a/ext/ripper/depend +++ b/ext/ripper/depend @@ -1,11 +1,11 @@ GEN = $(srcdir)/tools/generate.rb -SRC1 = $(hdrdir)/parse.y +SRC1 = $(top_srcdir)/parse.y SRC2 = $(srcdir)/eventids2.c BISON = bison src: ripper.c eventids1.c eventids2table.c -ripper.o: ripper.c $(topdir)/lex.c eventids1.c $(srcdir)/eventids2.c eventids2table.c +ripper.o: ripper.c lex.c eventids1.c eventids2.c eventids2table.c .y.c: $(BISON) -t -v -o$@ $< @@ -13,8 +13,8 @@ ripper.o: ripper.c $(topdir)/lex.c eventids1.c $(srcdir)/eventids2.c eventids2ta all: check static: check -ripper.y: $(srcdir)/tools/preproc.rb $(hdrdir)/parse.y - $(RUBY) $(srcdir)/tools/preproc.rb $(hdrdir)/parse.y --output=$@ +ripper.y: $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y + $(RUBY) $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y --output=$@ check: $(GEN) $(SRC1) $(SRC2) $(RUBY) $(GEN) --mode=check --ids1src=$(SRC1) --ids2src=$(SRC2) diff --git a/ext/ripper/extconf.rb b/ext/ripper/extconf.rb index 6b44073300966b..a41a6af2d83f20 100644 --- a/ext/ripper/extconf.rb +++ b/ext/ripper/extconf.rb @@ -12,8 +12,10 @@ def main end $objs = %w(ripper.o) $cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output eventids1.c eventids2table.c) - $CPPFLAGS += ' -DRIPPER' - $CPPFLAGS += ' -DRIPPER_DEBUG' if $debug + $defs << '-DRIPPER' + $defs << '-DRIPPER_DEBUG' if $debug + $VPATH << '$(topdir)' << '$(top_srcdir)' + $INCFLAGS << ' -I$(topdir) -I$(top_srcdir)' create_makefile 'ripper' end diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c index f9a5888624b50b..7fdeb0dbd0524c 100644 --- a/ext/sdbm/_sdbm.c +++ b/ext/sdbm/_sdbm.c @@ -12,7 +12,7 @@ #endif #include "sdbm.h" -#include "config.h" +#include "ruby/config.h" /* * sdbm - ndbm work-alike hashed database library diff --git a/ext/socket/depend b/ext/socket/depend index 77d5b665598f95..7577a6929a3ac7 100644 --- a/ext/socket/depend +++ b/ext/socket/depend @@ -1,6 +1,8 @@ -socket.o: socket.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/rubyio.h $(hdrdir)/rubysig.h sockport.h constants.h -getnameinfo.o: getnameinfo.c $(topdir)/config.h addrinfo.h sockport.h -getaddrinfo.o: getaddrinfo.c $(topdir)/config.h addrinfo.h sockport.h +socket.o: socket.c $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \ + $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/io.h $(hdrdir)/ruby/signal.h \ + sockport.h constants.h +getnameinfo.o: getnameinfo.c $(arch_hdrdir)/ruby/config.h addrinfo.h sockport.h +getaddrinfo.o: getaddrinfo.c $(arch_hdrdir)/ruby/config.h addrinfo.h sockport.h constants.h: $(srcdir)/mkconstants.rb @echo "generating constants.h" diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index 49fdf9b597efce..d97012a3c57822 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -38,7 +38,7 @@ * - PF_UNSPEC case would be handled in getipnodebyname() with the AI_ALL flag. */ -#include "config.h" +#include "ruby/config.h" #include #ifndef _WIN32 #include diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c index 91e18e916f01ac..dcfdc6b35a9d7e 100644 --- a/ext/socket/getnameinfo.c +++ b/ext/socket/getnameinfo.c @@ -34,7 +34,7 @@ * but INRIA implementation returns EAI_xxx defined for getaddrinfo(). */ -#include "config.h" +#include "ruby/config.h" #include #ifndef _WIN32 #if defined(__BEOS__) diff --git a/ext/socket/socket.c b/ext/socket/socket.c index a69baac7bb153c..aee4b215674a44 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -10,10 +10,10 @@ ************************************************/ -#include "ruby.h" -#include "rubyio.h" -#include "rubysig.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/signal.h" +#include "ruby/util.h" #include #include diff --git a/ext/stringio/depend b/ext/stringio/depend index cc9eae3f55cf34..a052c73de74224 100644 --- a/ext/stringio/depend +++ b/ext/stringio/depend @@ -1,2 +1,2 @@ -stringio.o: stringio.c $(hdrdir)/ruby.h $(topdir)/config.h \ - $(hdrdir)/defines.h $(hdrdir)/intern.h $(hdrdir)/rubyio.h +stringio.o: stringio.c $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \ + $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/io.h diff --git a/ext/strscan/depend b/ext/strscan/depend index 2a4255e9168a4d..76f6e0b18bb899 100644 --- a/ext/strscan/depend +++ b/ext/strscan/depend @@ -1,3 +1,2 @@ strscan.o: strscan.c $(hdrdir)/ruby.h $(hdrdir)/re.h $(hdrdir)/regex.h \ - $(hdrdir)/regint.h $(hdrdir)/oniguruma.h $(topdir)/config.h \ - $(hdrdir)/defines.h + $(hdrdir)/oniguruma.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index f991a13ac41005..63a0f1185eb974 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -8,8 +8,8 @@ the Ruby License. For details, see the file COPYING. */ -#include "ruby.h" -#include "re.h" +#include "ruby/ruby.h" +#include "ruby/re.h" #define STRSCAN_VERSION "0.7.0" diff --git a/ext/syck/bytecode.c b/ext/syck/bytecode.c index 567aaf52a86052..314ef229fe26e5 100644 --- a/ext/syck/bytecode.c +++ b/ext/syck/bytecode.c @@ -8,7 +8,7 @@ * * Copyright (C) 2003 why the lucky stiff */ -#include "ruby.h" +#include "ruby/ruby.h" #include "syck.h" #include "gram.h" diff --git a/ext/syck/emitter.c b/ext/syck/emitter.c index d3704f867b55b9..03bdaa2dd72a11 100644 --- a/ext/syck/emitter.c +++ b/ext/syck/emitter.c @@ -9,7 +9,7 @@ * All Base64 code from Ruby's pack.c. * Ruby is Copyright (C) 1993-2003 Yukihiro Matsumoto */ -#include "ruby.h" +#include "ruby/ruby.h" #include #include diff --git a/ext/syck/handler.c b/ext/syck/handler.c index b04c4e3c0e0cf3..3ff1a4e440b834 100644 --- a/ext/syck/handler.c +++ b/ext/syck/handler.c @@ -7,7 +7,7 @@ * Copyright (C) 2003 why the lucky stiff */ -#include "ruby.h" +#include "ruby/ruby.h" #include "syck.h" SYMID diff --git a/ext/syck/implicit.c b/ext/syck/implicit.c index cfd5d7b3e6812d..df32d9194b68f3 100644 --- a/ext/syck/implicit.c +++ b/ext/syck/implicit.c @@ -9,7 +9,7 @@ * Copyright (C) 2003 why the lucky stiff */ -#include "ruby.h" +#include "ruby/ruby.h" #include "syck.h" #define YYCTYPE char diff --git a/ext/syck/node.c b/ext/syck/node.c index 47bce649001e9a..99cc9c7515133e 100644 --- a/ext/syck/node.c +++ b/ext/syck/node.c @@ -7,7 +7,7 @@ * Copyright (C) 2003 why the lucky stiff */ -#include "ruby.h" +#include "ruby/ruby.h" #include "syck.h" /* diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index 1966a2d3348943..9a41c18e8f7b3e 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -8,7 +8,7 @@ * Copyright (C) 2003-2005 why the lucky stiff */ -#include "ruby.h" +#include "ruby/ruby.h" #include "syck.h" #include #include diff --git a/ext/syck/syck.c b/ext/syck/syck.c index bab7ee5dc6b004..20aaecc9f0c031 100644 --- a/ext/syck/syck.c +++ b/ext/syck/syck.c @@ -6,7 +6,7 @@ * * Copyright (C) 2003 why the lucky stiff */ -#include "ruby.h" +#include "ruby/ruby.h" #include #include diff --git a/ext/syck/syck.h b/ext/syck/syck.h index 8d878a43596e1a..0fdff8e380a577 100644 --- a/ext/syck/syck.h +++ b/ext/syck/syck.h @@ -18,7 +18,7 @@ #include #include -#include "st.h" +#include "ruby/st.h" #if defined(__cplusplus) extern "C" { diff --git a/ext/syck/token.c b/ext/syck/token.c index 3c6cd1a9cf68ef..0517ffc400ba26 100644 --- a/ext/syck/token.c +++ b/ext/syck/token.c @@ -8,7 +8,7 @@ * * Copyright (C) 2003 why the lucky stiff */ -#include "ruby.h" +#include "ruby/ruby.h" #include "syck.h" #include "gram.h" diff --git a/ext/syck/yaml2byte.c b/ext/syck/yaml2byte.c index bcc428e1cd5cf9..fd5caadd85c8d1 100644 --- a/ext/syck/yaml2byte.c +++ b/ext/syck/yaml2byte.c @@ -9,7 +9,7 @@ * WARNING WARNING WARNING --- THIS IS *NOT JUST* PLAYING * ANYMORE! -- WHY HAS EMBRACED THIS AS THE REAL THING! */ -#include "ruby.h" +#include "ruby/ruby.h" #include #include #define YAMLBYTE_UTF8 diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c index d4945ae7b44565..4ac645969ddeff 100644 --- a/ext/syslog/syslog.c +++ b/ext/syslog/syslog.c @@ -7,8 +7,8 @@ * $Id$ */ -#include "ruby.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/util.h" #include /* Syslog class */ diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb index 5ed86a8b7621da..123899043a3e75 100644 --- a/ext/tk/extconf.rb +++ b/ext/tk/extconf.rb @@ -307,6 +307,8 @@ def pthread_check() $INSTALLFILES << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"] # create + $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"] + $defs << %[-DRUBY_RELEASE_DATE=\\"#{RUBY_RELEASE_DATE}\\"] create_makefile("tcltklib") end end diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c index 426505f3ae457c..d0aaf61f31389c 100644 --- a/ext/tk/stubs.c +++ b/ext/tk/stubs.c @@ -1,5 +1,5 @@ #include "stubs.h" -#include "ruby.h" +#include "ruby/ruby.h" #include #include diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index 498944d453498d..4f779c731eec5e 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -6,9 +6,8 @@ #define TCLTKLIB_RELEASE_DATE "2006-12-01" -#include "ruby.h" -#include "rubysig.h" -#include "version.h" +#include "ruby/ruby.h" +#include "ruby/signal.h" #undef EXTERN /* avoid conflict with tcl.h of tcl8.2 or before */ #include #ifdef HAVE_STDARG_PROTOTYPES diff --git a/ext/tk/tkutil/extconf.rb b/ext/tk/tkutil/extconf.rb index dd00d5d535c9e5..51f775619cf090 100644 --- a/ext/tk/tkutil/extconf.rb +++ b/ext/tk/tkutil/extconf.rb @@ -7,5 +7,6 @@ if has_tk require 'mkmf' + have_func("rb_obj_instance_exec", "ruby.h") create_makefile('tkutil') end diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index 0b2597ec1a910e..25c4af742dbb8e 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -10,10 +10,9 @@ #define TKUTIL_RELEASE_DATE "2006-04-06" -#include "ruby.h" -#include "rubysig.h" -#include "version.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/signal.h" +#include "ruby/st.h" static VALUE cMethod; @@ -59,7 +58,7 @@ tk_s_new(argc, argv, klass) VALUE obj = rb_class_new_instance(argc, argv, klass); if (rb_block_given_p()) { -#if RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR <= 8 /* ruby 1.8.x */ +#ifndef HAVE_RB_OBJ_INSTANCE_EXEC rb_obj_instance_eval(0, 0, obj); #else rb_obj_instance_exec(1, &obj, obj); diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index c63401a7c80f24..5b31898318a72c 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -16,8 +16,8 @@ modified for win32ole (ruby) by Masaki.Suketa */ -#include "ruby.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/st.h" #include #include #include @@ -1076,8 +1076,8 @@ ole_set_safe_array(long n, SAFEARRAY *psa, long *pid, long *pub, VALUE val, long val1 = ole_ary_m_entry(val, pid); p = val2variant_ptr(val1, &var, vt); if (is_all_index_under(pid, pub, dim) == Qtrue) { - if (V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == NULL || - V_VT(&var) == VT_UNKNOWN && V_UNKNOWN(&var) == NULL) { + if ((V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == NULL) || + (V_VT(&var) == VT_UNKNOWN && V_UNKNOWN(&var) == NULL)) { rb_raise(eWIN32OLERuntimeError, "argument does not have IDispatch or IUnknown Interface"); } hr = SafeArrayPutElement(psa, pid, p); @@ -2669,7 +2669,7 @@ fole_s_set_locale(VALUE self, VALUE vlcid) cWIN32OLE_lcid = lcid; break; default: - rb_raise(eWIN32OLERuntimeError, "not installed locale: %d", lcid); + rb_raise(eWIN32OLERuntimeError, "not installed locale: %u", (unsigned int)lcid); } } return Qnil; @@ -7827,7 +7827,6 @@ folevariant_ary_aset(int argc, VALUE *argv, VALUE self) { struct olevariantdata *pvar; SAFEARRAY *psa; - VALUE val = Qnil; VARIANT var; VARTYPE vt; long *pid; @@ -7849,8 +7848,8 @@ folevariant_ary_aset(int argc, VALUE *argv, VALUE self) VariantInit(&var); vt = (V_VT(&(pvar->var)) & ~VT_ARRAY); p = val2variant_ptr(argv[argc-1], &var, vt); - if (V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == NULL || - V_VT(&var) == VT_UNKNOWN && V_UNKNOWN(&var) == NULL) { + if ((V_VT(&var) == VT_DISPATCH && V_DISPATCH(&var) == NULL) || + (V_VT(&var) == VT_UNKNOWN && V_UNKNOWN(&var) == NULL)) { rb_raise(eWIN32OLERuntimeError, "argument does not have IDispatch or IUnknown Interface"); } hr = SafeArrayPutElement(psa, pid, p); diff --git a/file.c b/file.c index 54822a85a9272c..ed682a0b800c4e 100644 --- a/file.c +++ b/file.c @@ -16,10 +16,10 @@ #include "missing/file.h" #endif -#include "ruby.h" -#include "rubyio.h" -#include "rubysig.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/signal.h" +#include "ruby/util.h" #include "dln.h" #ifdef HAVE_UNISTD_H diff --git a/gc.c b/gc.c index 91340475e1fff6..4ea96efe208e13 100644 --- a/gc.c +++ b/gc.c @@ -12,11 +12,11 @@ **********************************************************************/ -#include "ruby.h" -#include "rubysig.h" -#include "st.h" -#include "node.h" -#include "re.h" +#include "ruby/ruby.h" +#include "ruby/signal.h" +#include "ruby/st.h" +#include "ruby/node.h" +#include "ruby/re.h" #include "yarvcore.h" #include "gc.h" #include diff --git a/hash.c b/hash.c index 5f578fa2995c1f..3f27a0c6335d8a 100644 --- a/hash.c +++ b/hash.c @@ -12,10 +12,10 @@ **********************************************************************/ -#include "ruby.h" -#include "st.h" -#include "util.h" -#include "rubysig.h" +#include "ruby/ruby.h" +#include "ruby/st.h" +#include "ruby/util.h" +#include "ruby/signal.h" #ifdef __APPLE__ #include diff --git a/include/ruby.h b/include/ruby.h new file mode 100644 index 00000000000000..b1fb46c8975702 --- /dev/null +++ b/include/ruby.h @@ -0,0 +1 @@ +#include diff --git a/defines.h b/include/ruby/defines.h similarity index 95% rename from defines.h rename to include/ruby/defines.h index 1f5a0054f1c8e8..81f2ef45ed58f2 100644 --- a/defines.h +++ b/include/ruby/defines.h @@ -7,8 +7,16 @@ created at: Wed May 18 00:21:44 JST 1994 ************************************************/ -#ifndef DEFINES_H -#define DEFINES_H + +#ifndef RUBY_DEFINES_H +#define RUBY_DEFINES_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif #define RUBY @@ -185,7 +193,7 @@ void xfree(void*); #endif /* NeXT */ #ifdef _WIN32 -#include "win32/win32.h" +#include "ruby/win32.h" #endif #if defined(__VMS) @@ -266,4 +274,11 @@ void rb_ia64_flushrs(void); #define RUBY_PLATFORM "unknown-unknown" #endif +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ #endif + +#endif /* RUBY_DEFINES_H */ diff --git a/intern.h b/include/ruby/intern.h similarity index 99% rename from intern.h rename to include/ruby/intern.h index e230ac5ce6f229..a74bd8ed23fd06 100644 --- a/intern.h +++ b/include/ruby/intern.h @@ -15,12 +15,19 @@ #ifndef RUBY_INTERN_H #define RUBY_INTERN_H 1 +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif + #ifdef HAVE_STDARG_PROTOTYPES # include #else # include #endif -#include +#include /* * Functions and variables that are used by more than one source file of @@ -610,4 +617,11 @@ void Init_stack(VALUE*); void rb_frame_pop(void); NORETURN(void rb_thread_start_1(void)); +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ +#endif + #endif /* RUBY_INTERN_H */ diff --git a/rubyio.h b/include/ruby/io.h similarity index 92% rename from rubyio.h rename to include/ruby/io.h index 14d203918333d2..6d22de8df1108f 100644 --- a/rubyio.h +++ b/include/ruby/io.h @@ -10,8 +10,15 @@ **********************************************************************/ -#ifndef RUBYIO_H -#define RUBYIO_H +#ifndef RUBY_IO_H +#define RUBY_IO_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif #include #include @@ -108,4 +115,12 @@ DEPRECATED(int rb_getc(FILE*)); DEPRECATED(long rb_io_fread(char *, long, FILE *)); DEPRECATED(long rb_io_fwrite(const char *, long, FILE *)); DEPRECATED(int rb_read_pending(FILE*)); + +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ #endif + +#endif /* RUBY_IO_H */ diff --git a/missing.h b/include/ruby/missing.h similarity index 91% rename from missing.h rename to include/ruby/missing.h index 81fdfecf72b307..007c546617596c 100644 --- a/missing.h +++ b/include/ruby/missing.h @@ -9,8 +9,15 @@ ************************************************/ -#ifndef MISSING_H -#define MISSING_H +#ifndef RUBY_MISSING_H +#define RUBY_MISSING_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif #if defined(HAVE_SYS_TIME_H) # include @@ -145,4 +152,11 @@ extern size_t strlcpy(char *, const char*, size_t); extern size_t strlcat(char *, const char*, size_t); #endif -#endif /* MISSING_H */ +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ +#endif + +#endif /* RUBY_MISSING_H */ diff --git a/node.h b/include/ruby/node.h similarity index 98% rename from node.h rename to include/ruby/node.h index bc9a5923d0ca14..a477c9d555cfc3 100644 --- a/node.h +++ b/include/ruby/node.h @@ -10,11 +10,14 @@ **********************************************************************/ -#ifndef NODE_H -#define NODE_H +#ifndef RUBY_NODE_H +#define RUBY_NODE_H 1 #if defined(__cplusplus) extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif #endif enum node_type { @@ -388,7 +391,10 @@ VALUE rb_gvar_set(struct global_entry *, VALUE); VALUE rb_gvar_defined(struct global_entry *); #if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif } /* extern "C" { */ #endif -#endif +#endif /* RUBY_NODE_H */ diff --git a/oniguruma.h b/include/ruby/oniguruma.h similarity index 99% rename from oniguruma.h rename to include/ruby/oniguruma.h index 97c581dfd68868..a615426e391d4f 100644 --- a/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -31,6 +31,9 @@ #ifdef __cplusplus extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif #endif #define ONIGURUMA @@ -804,6 +807,9 @@ ONIG_EXTERN const char* onig_copyright P_((void)); #ifdef __cplusplus +#if 0 +{ /* satisfy cc-mode */ +#endif } #endif diff --git a/re.h b/include/ruby/re.h similarity index 77% rename from re.h rename to include/ruby/re.h index ab66352288192a..ae6e0357b674e5 100644 --- a/re.h +++ b/include/ruby/re.h @@ -10,13 +10,20 @@ **********************************************************************/ -#ifndef RE_H -#define RE_H +#ifndef RUBY_RE_H +#define RUBY_RE_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif #include #include -#include "regex.h" +#include "ruby/regex.h" typedef struct re_pattern_buffer Regexp; @@ -40,4 +47,12 @@ RUBY_EXTERN int ruby_ignorecase; int rb_reg_mbclen2(unsigned int, VALUE); #define mbclen2(c,re) rb_reg_mbclen2((c),(re)) + +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ #endif + +#endif /* RUBY_RE_H */ diff --git a/regex.h b/include/ruby/regex.h similarity index 61% rename from regex.h rename to include/ruby/regex.h index d2877937ca1e63..118c37c4808d09 100644 --- a/regex.h +++ b/include/ruby/regex.h @@ -9,10 +9,21 @@ **********************************************************************/ -#ifndef REGEX_H -#define REGEX_H - +#ifndef ONIGURUMA_REGEX_H +#define ONIGURUMA_REGEX_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif + +#ifdef RUBY +#include "ruby/oniguruma.h" +#else #include "oniguruma.h" +#endif #ifndef ONIG_RUBY_M17N @@ -25,4 +36,11 @@ ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding; #endif /* ifndef ONIG_RUBY_M17N */ -#endif /* !REGEX_H */ +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ +#endif + +#endif /* ONIGURUMA_REGEX_H */ diff --git a/ruby.h b/include/ruby/ruby.h similarity index 99% rename from ruby.h rename to include/ruby/ruby.h index c54d445e58a99d..69aadf14c46f9b 100644 --- a/ruby.h +++ b/include/ruby/ruby.h @@ -12,7 +12,7 @@ **********************************************************************/ #ifndef RUBY_H -#define RUBY_H +#define RUBY_H 1 #if defined(__cplusplus) extern "C" { @@ -21,7 +21,7 @@ extern "C" { #endif #endif -#include "config.h" +#include "ruby/config.h" #ifdef RUBY_EXTCONF_H #include RUBY_EXTCONF_H #endif @@ -805,8 +805,8 @@ rb_special_const_p(VALUE obj) return Qfalse; } -#include "missing.h" -#include "intern.h" +#include "ruby/missing.h" +#include "ruby/intern.h" #if defined(EXTLIB) && defined(USE_DLN_A_OUT) /* hook for external modules */ @@ -823,4 +823,4 @@ static char *dln_libs_to_be_linked[] = { EXTLIB, 0 }; } /* extern "C" { */ #endif -#endif /* ifndef RUBY_H */ +#endif /* RUBY_H */ diff --git a/rubysig.h b/include/ruby/signal.h similarity index 90% rename from rubysig.h rename to include/ruby/signal.h index 2df03e415c16ac..29ffcd9f112839 100644 --- a/rubysig.h +++ b/include/ruby/signal.h @@ -11,7 +11,15 @@ **********************************************************************/ #ifndef RUBYSIG_H -#define RUBYSIG_H +#define RUBYSIG_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif + #include #ifdef _WIN32 @@ -75,4 +83,11 @@ void rb_trap_restore_mask(void); RUBY_EXTERN int rb_thread_critical; void rb_thread_schedule(void); -#endif /* ifndef RUBYSIG_H */ +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ +#endif + +#endif /* RUBYSIG_H */ diff --git a/st.h b/include/ruby/st.h similarity index 87% rename from st.h rename to include/ruby/st.h index 45609ddeb189af..d6d4479b3e8ce2 100644 --- a/st.h +++ b/include/ruby/st.h @@ -2,9 +2,15 @@ /* @(#) st.h 5.1 89/12/14 */ -#ifndef ST_INCLUDED +#ifndef RUBY_ST_H +#define RUBY_ST_H 1 -#define ST_INCLUDED +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif #if SIZEOF_LONG == SIZEOF_VOIDP typedef unsigned long st_data_t; @@ -63,4 +69,11 @@ st_table *st_copy(st_table *); int st_numcmp(long, long); int st_numhash(long); -#endif /* ST_INCLUDED */ +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ +#endif + +#endif /* RUBY_ST_H */ diff --git a/util.h b/include/ruby/util.h similarity index 85% rename from util.h rename to include/ruby/util.h index b95a98ecae2dd5..8437872479b69e 100644 --- a/util.h +++ b/include/ruby/util.h @@ -10,8 +10,15 @@ **********************************************************************/ -#ifndef UTIL_H -#define UTIL_H +#ifndef RUBY_UTIL_H +#define RUBY_UTIL_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif #ifndef _ #ifdef __cplusplus @@ -64,4 +71,11 @@ double ruby_strtod(const char *, char **); #undef strtod #define strtod(s,e) ruby_strtod(s,e) -#endif /* UTIL_H */ +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ +#endif + +#endif /* RUBY_UTIL_H */ diff --git a/win32/win32.h b/include/ruby/win32.h similarity index 98% rename from win32/win32.h rename to include/ruby/win32.h index 281dbc2998c3b8..450cb328531cde 100644 --- a/win32/win32.h +++ b/include/ruby/win32.h @@ -1,5 +1,12 @@ #ifndef RUBY_WIN32_H -#define RUBY_WIN32_H +#define RUBY_WIN32_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif /* * Copyright (c) 1993, Intergraph Corporation @@ -527,4 +534,11 @@ in asynchronous_func_t. typedef DWORD (*asynchronous_func_t)(DWORD self, int argc, DWORD* argv); DWORD rb_w32_asynchronize(asynchronous_func_t func, DWORD self, int argc, DWORD* argv, DWORD intrval); +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ #endif + +#endif /* RUBY_WIN32_H */ diff --git a/include/rubyio.h b/include/rubyio.h new file mode 100644 index 00000000000000..f385058c445bed --- /dev/null +++ b/include/rubyio.h @@ -0,0 +1 @@ +#include diff --git a/include/rubysig.h b/include/rubysig.h new file mode 100644 index 00000000000000..cc8cdb2f6d5005 --- /dev/null +++ b/include/rubysig.h @@ -0,0 +1 @@ +#include diff --git a/inits.c b/inits.c index e6b75723999a7c..ef94f993e7aec3 100644 --- a/inits.c +++ b/inits.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" void Init_Array(void); void Init_Bignum(void); diff --git a/instruby.rb b/instruby.rb index 8327d8c570aede..52f81af4d5af83 100755 --- a/instruby.rb +++ b/instruby.rb @@ -127,7 +127,14 @@ def install_recursive(srcdir, dest, options = {}) subpath = srcdir.size..-1 Dir.glob("#{srcdir}/**/*", File::FNM_DOTMATCH) do |src| next if /\A\.{1,2}\z/ =~ (base = File.basename(src)) - next if noinst and File.fnmatch?(noinst, File.basename(src)) + if noinst + base = File.basename(src) + if Array === noinst + next if noinst.any? {|n| File.fnmatch?(n, base)} + else + next if File.fnmatch?(noinst, base) + end + end d = dest + src[subpath] if File.directory?(src) makedirs(d) @@ -158,6 +165,8 @@ def with_destdir(dir) version = CONFIG["ruby_version"] bindir = CONFIG["bindir"] libdir = CONFIG["libdir"] +archhdrdir = rubyhdrdir = CONFIG["rubyhdrdir"] +archhdrdir += "/" + CONFIG["arch"] rubylibdir = CONFIG["rubylibdir"] archlibdir = CONFIG["archdir"] sitelibdir = CONFIG["sitelibdir"] @@ -172,7 +181,7 @@ def with_destdir(dir) install?(:local, :arch, :bin) do puts "installing binary commands" - makedirs [bindir, libdir, archlibdir] + makedirs [bindir, libdir, archlibdir, archhdrdir] install ruby_install_name+exeext, bindir, :mode => 0755 if rubyw_install_name and !rubyw_install_name.empty? @@ -183,7 +192,6 @@ def with_destdir(dir) end install lib, libdir, :mode => 0755 unless lib == arc install arc, libdir, :mode => 0644 - install "config.h", archlibdir, :mode => 0644 install "rbconfig.rb", archlibdir, :mode => 0644 if CONFIG["ARCHFILE"] for file in CONFIG["ARCHFILE"].split @@ -207,11 +215,13 @@ def with_destdir(dir) noinst = nil end install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst) + install_recursive("#{extout}/include/#{CONFIG['arch']}", archhdrdir) end install?(:ext, :comm, :'ext-comm') do puts "installing extension scripts" makedirs [rubylibdir, sitelibdir] install_recursive("#{extout}/common", rubylibdir) + install_recursive("#{extout}/include", rubyhdrdir) end end @@ -297,16 +307,13 @@ def with_destdir(dir) puts "installing headers" Dir.chdir(srcdir) - makedirs [archlibdir] - for f in Dir["*.h"] - install f, archlibdir, :mode => 0644 - end - - if RUBY_PLATFORM =~ /mswin32|mingw|bccwin32/ - win32libdir = File.join(archlibdir, "win32") - makedirs win32libdir - install "win32/win32.h", win32libdir, :mode => 0644 + makedirs [rubyhdrdir] + noinst = [] + unless RUBY_PLATFORM =~ /mswin32|mingw|bccwin32/ + noinst << "win32.h" end + noinst = nil if noinst.empty? + install_recursive("include", rubyhdrdir, :no_install => noinst) end install?(:local, :comm, :man) do diff --git a/io.c b/io.c index 84c6b87cfa3807..cda216789b5a2d 100644 --- a/io.c +++ b/io.c @@ -12,9 +12,9 @@ **********************************************************************/ -#include "ruby.h" -#include "rubyio.h" -#include "rubysig.h" +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/signal.h" #include #include @@ -87,7 +87,7 @@ extern void Init_File(void); #include #endif -#include "util.h" +#include "ruby/util.h" #ifndef O_ACCMODE #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) diff --git a/iseq.c b/iseq.c index f8a7e8a54595ab..8fe442316cb8bf 100644 --- a/iseq.c +++ b/iseq.c @@ -10,8 +10,8 @@ **********************************************************************/ -#include -#include +#include "ruby/ruby.h" +#include "ruby/node.h" #include "yarvcore.h" #include "insns.inc" diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 797388f591eff2..54299fe69687e4 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -73,11 +73,13 @@ def dir_re(dir) INSTALL_DIRS = [ [dir_re('commondir'), "$(RUBYCOMMONDIR)"], - [dir_re("sitedir"), "$(RUBYCOMMONDIR)"], + [dir_re('sitedir'), "$(RUBYCOMMONDIR)"], [dir_re('rubylibdir'), "$(RUBYLIBDIR)"], [dir_re('archdir'), "$(RUBYARCHDIR)"], [dir_re('sitelibdir'), "$(RUBYLIBDIR)"], - [dir_re('sitearchdir'), "$(RUBYARCHDIR)"] + [dir_re('sitearchdir'), "$(RUBYARCHDIR)"], + [dir_re('rubyhdrdir'), "$(RUBYHDRDIR)"], + [dir_re('sitehdrdir'), "$(SITEHDRDIR)"], ] def install_dirs(target_prefix = nil) @@ -86,6 +88,8 @@ def install_dirs(target_prefix = nil) ['RUBYCOMMONDIR', '$(extout)/common'], ['RUBYLIBDIR', '$(RUBYCOMMONDIR)$(target_prefix)'], ['RUBYARCHDIR', '$(extout)/$(arch)$(target_prefix)'], + ['HDRDIR', '$(extout)/include/ruby$(target_prefix)'], + ['ARCHHDRDIR', '$(extout)/include/$(arch)/ruby$(target_prefix)'], ['extout', "#$extout"], ['extout_prefix', "#$extout_prefix"], ] @@ -94,12 +98,16 @@ def install_dirs(target_prefix = nil) ['RUBYCOMMONDIR', '$(rubylibdir)'], ['RUBYLIBDIR', '$(rubylibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(archdir)$(target_prefix)'], + ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], + ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], ] else - dirs = [ +n dirs = [ ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], + ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], + ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], ] end dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")] @@ -114,11 +122,13 @@ def map_dir(dir, map = nil) topdir = File.dirname(libdir = File.dirname(__FILE__)) extdir = File.expand_path("ext", topdir) $extmk = File.expand_path($0)[0, extdir.size+1] == extdir+"/" -if not $extmk and File.exist?(RbConfig::CONFIG["archdir"] + "/ruby.h") - $hdrdir = $topdir = RbConfig::CONFIG["archdir"] -elsif File.exist?(($top_srcdir ||= topdir) + "/ruby.h") and - File.exist?(($topdir ||= RbConfig::CONFIG["topdir"]) + "/config.h") - $hdrdir = $top_srcdir +if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h") + $topdir = $hdrdir + $arch_hdrdir = $hdrdir + "/$(arch)" +elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h") and + File.exist?("#{CONFIG["EXTOUT"]}/include/#{CONFIG["arch"]}/ruby/config.h") + $topdir ||= RbConfig::CONFIG["topdir"] + $arch_hdrdir = "$(extout)/include/$(arch)" else abort "can't find header files for ruby." end @@ -126,11 +136,11 @@ def map_dir(dir, map = nil) OUTFLAG = CONFIG['OUTFLAG'] CPPOUTFILE = CONFIG['CPPOUTFILE'] -CONFTEST_C = "conftest.c" +CONFTEST_C = "conftest.c".freeze class String def quote - /\s/ =~ self ? "\"#{self}\"" : self + /\s/ =~ self ? "\"#{self}\"" : "#{self}" end end class Array @@ -269,8 +279,10 @@ def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH) RbConfig::expand(TRY_LINK.dup, CONFIG.merge('hdrdir' => $hdrdir.quote, 'src' => CONFTEST_C, - 'INCFLAGS' => $INCFLAGS, - 'CPPFLAGS' => $CPPFLAGS, + 'arch_hdrdir' => "#$arch_hdrdir", + 'top_srcdir' => $top_srcdir.quote, + 'INCFLAGS' => "#$INCFLAGS", + 'CPPFLAGS' => "#$CPPFLAGS", 'CFLAGS' => "#$CFLAGS", 'ARCH_FLAG' => "#$ARCH_FLAG", 'LDFLAGS' => "#$LDFLAGS #{ldflags}", @@ -281,12 +293,16 @@ def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH) def cc_command(opt="") RbConfig::expand("$(CC) #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}", - CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)) + CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote, + 'arch_hdrdir' => "#$arch_hdrdir", + 'top_srcdir' => $top_srcdir.quote)) end def cpp_command(outfile, opt="") RbConfig::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}", - CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)) + CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote, + 'arch_hdrdir' => "#$arch_hdrdir", + 'top_srcdir' => $top_srcdir.quote)) end def libpathflag(libpath=$DEFLIBPATH|$LIBPATH) @@ -1037,12 +1053,12 @@ def winsep(s) def configuration(srcdir) mk = [] - vpath = %w[$(srcdir) $(topdir) $(hdrdir)] + vpath = $VPATH.dup if !CROSS_COMPILING case CONFIG['build_os'] when 'cygwin' if CONFIG['target_os'] != 'cygwin' - vpath.each {|p| p.sub!(/.*/, '$(shell cygpath -u \&)')} + vpath = vpath.map {|p| p.sub(/.*/, '$(shell cygpath -u \&)')} end when 'msdosdjgpp', 'mingw32' CONFIG['PATH_SEPARATOR'] = ';' @@ -1053,10 +1069,15 @@ def configuration(srcdir) SHELL = /bin/sh #### Start of system configuration section. #### - +#{ +if $extmk + "top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") +end +} srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {CONFIG[$1||$2]}.quote} topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote} -hdrdir = #{$extmk ? CONFIG["hdrdir"].quote : '$(topdir)'} +hdrdir = #{CONFIG["hdrdir"].quote} +arch_hdrdir = #{$arch_hdrdir} VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} } if $extmk @@ -1071,7 +1092,8 @@ def configuration(srcdir) end CONFIG.each do |key, var| next if /^abs_/ =~ key - next unless /^(?:src|top|hdr|(.*))dir$/ =~ key and $1 + next if /^(?:src|top|hdr)dir$/ =~ key + next unless /dir$/ =~ key mk << "#{key} = #{with_destdir(var)}\n" end if !$extmk and !$configure_args.has_key?('--ruby') and @@ -1397,7 +1419,8 @@ def create_makefile(target, srcprefix = nil) end while line = dfile.gets() line.gsub!(/\.o\b/, ".#{$OBJEXT}") - line.gsub!(/\$\(hdrdir\)\/config.h/, $config_h) if $config_h + line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h) if $config_h + line.gsub!(%r"\$\(hdrdir\)/(?!ruby/)", '\&ruby/') if /(?:^|[^\\])(?:\\\\)*\\$/ =~ line (cont ||= []) << line next @@ -1442,7 +1465,7 @@ def init_mkmf(config = CONFIG) $ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup - $INCFLAGS = "-I$(topdir) -I$(hdrdir) -I$(srcdir)" + $INCFLAGS = "-I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir)" $DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup $LIBEXT = config['LIBEXT'].dup $OBJEXT = config["OBJEXT"].dup @@ -1454,6 +1477,7 @@ def init_mkmf(config = CONFIG) $DEFLIBPATH.unshift(".") $LIBPATH = [] $INSTALLFILES = nil + $VPATH = %w[$(srcdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby] $objs = nil $srcs = nil diff --git a/main.c b/main.c index 48ec4e08deaef0..80a155fb0c200d 100644 --- a/main.c +++ b/main.c @@ -11,7 +11,7 @@ **********************************************************************/ #undef RUBY_EXPORT -#include "ruby.h" +#include "ruby/ruby.h" #if defined(__MACOS__) && defined(__MWERKS__) #include diff --git a/marshal.c b/marshal.c index 96ed62723f587d..c6c512bdb0f8ee 100644 --- a/marshal.c +++ b/marshal.c @@ -10,10 +10,10 @@ **********************************************************************/ -#include "ruby.h" -#include "rubyio.h" -#include "st.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/st.h" +#include "ruby/util.h" #include #ifdef HAVE_FLOAT_H diff --git a/math.c b/math.c index bd02849002452c..d0c2eee4876464 100644 --- a/math.c +++ b/math.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include #include diff --git a/missing/flock.c b/missing/flock.c index 2219d176d1758a..b02f8bf832cd1c 100644 --- a/missing/flock.c +++ b/missing/flock.c @@ -1,4 +1,4 @@ -#include "config.h" +#include "ruby/config.h" #if defined _WIN32 #elif defined HAVE_FCNTL && defined HAVE_FCNTL_H diff --git a/missing/strftime.c b/missing/strftime.c index 5522226ec18b0f..ba6785233a64aa 100644 --- a/missing/strftime.c +++ b/missing/strftime.c @@ -45,7 +45,7 @@ * January 1996 */ -#include "config.h" +#include "ruby/config.h" #ifndef GAWK #include diff --git a/numeric.c b/numeric.c index ceaba65fee99a4..4c702d097e02a0 100644 --- a/numeric.c +++ b/numeric.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include #include #include diff --git a/object.c b/object.c index 573f75a3dd3c2a..6264b163c986a8 100644 --- a/object.c +++ b/object.c @@ -12,9 +12,10 @@ **********************************************************************/ -#include "ruby.h" -#include "st.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/st.h" +#include "ruby/util.h" +#include "debug.h" #include #include #include @@ -384,7 +385,7 @@ rb_obj_is_instance_of(VALUE obj, VALUE c) * b.kind_of? C #=> false * b.kind_of? M #=> true */ -#include "debug.h" + VALUE rb_obj_is_kind_of(VALUE obj, VALUE c) { @@ -1675,7 +1676,7 @@ rb_obj_public_methods(int argc, VALUE *argv, VALUE obj) * fred.instance_variable_get(:@a) #=> "cat" * fred.instance_variable_get("@b") #=> 99 */ -#include "debug.h" + static VALUE rb_obj_ivar_get(VALUE obj, VALUE iv) { diff --git a/pack.c b/pack.c index 767bead448b832..726048fae0cb0d 100644 --- a/pack.c +++ b/pack.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include #include diff --git a/parse.y b/parse.y index 0990ba68c85965..14a081a0666f99 100644 --- a/parse.y +++ b/parse.y @@ -16,10 +16,10 @@ #define YYERROR_VERBOSE 1 #define YYSTACK_USE_ALLOCA 0 -#include "ruby.h" -#include "intern.h" -#include "node.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/intern.h" +#include "ruby/node.h" +#include "ruby/st.h" #include #include #include @@ -4544,8 +4544,8 @@ ripper_dispatch_delayed_token(struct parser_params *parser, int t) } #endif /* RIPPER */ -#include "regex.h" -#include "util.h" +#include "ruby/regex.h" +#include "ruby/util.h" /* We remove any previous definition of `SIGN_EXTEND_CHAR', since ours (we hope) works properly with all combinations of diff --git a/prec.c b/prec.c index 80396dfdefe3e6..981dcbc85cde12 100644 --- a/prec.c +++ b/prec.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" VALUE rb_mPrecision; diff --git a/process.c b/process.c index c6caf5f7f2c2ea..c0376f166600e1 100644 --- a/process.c +++ b/process.c @@ -12,8 +12,8 @@ **********************************************************************/ -#include "ruby.h" -#include "rubysig.h" +#include "ruby/ruby.h" +#include "ruby/signal.h" #include "yarvcore.h" #include @@ -50,7 +50,7 @@ struct timeval rb_time_interval(VALUE); #ifdef HAVE_SYS_RESOURCE_H # include #endif -#include "st.h" +#include "ruby/st.h" #ifdef __EMX__ #undef HAVE_GETPGRP diff --git a/random.c b/random.c index 8dad78a274f994..d37995baffb2a6 100644 --- a/random.c +++ b/random.c @@ -176,7 +176,7 @@ genrand_real(void) /* These real versions are due to Isaku Wada, 2002/01/09 added */ -#include "ruby.h" +#include "ruby/ruby.h" #ifdef HAVE_UNISTD_H #include diff --git a/range.c b/range.c index e010778e0d75c9..ec866de8ebe019 100644 --- a/range.c +++ b/range.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" VALUE rb_cRange; static ID id_cmp, id_succ, id_beg, id_end, id_excl; diff --git a/re.c b/re.c index 07d8fd5db34ea5..5398e299466bb5 100644 --- a/re.c +++ b/re.c @@ -9,8 +9,8 @@ **********************************************************************/ -#include "ruby.h" -#include "re.h" +#include "ruby/ruby.h" +#include "ruby/re.h" #include "regint.h" #include diff --git a/regenc.h b/regenc.h index b1d6f228185cf3..882971ceb60927 100644 --- a/regenc.h +++ b/regenc.h @@ -29,12 +29,12 @@ * SUCH DAMAGE. */ #ifndef REGINT_H -#include "config.h" +#include "ruby/config.h" #ifdef ONIG_ESCAPE_UCHAR_COLLISION #undef ONIG_ESCAPE_UCHAR_COLLISION #endif #endif -#include "oniguruma.h" +#include "ruby/oniguruma.h" typedef struct { OnigCodePoint from; diff --git a/regint.h b/regint.h index f76469f371d416..4a6fc46337fd21 100644 --- a/regint.h +++ b/regint.h @@ -80,9 +80,9 @@ /* */ /* escape other system UChar definition */ -#ifndef DEFINES_H -#include "config.h" -#include "defines.h" +#ifndef RUBY_DEFINES_H +#include "ruby/config.h" +#include "ruby/defines.h" #endif #ifdef ONIG_ESCAPE_UCHAR_COLLISION #undef ONIG_ESCAPE_UCHAR_COLLISION diff --git a/regparse.c b/regparse.c index a255644b348ddc..1d669212d5570b 100644 --- a/regparse.c +++ b/regparse.c @@ -302,7 +302,7 @@ typedef struct { #ifdef USE_ST_HASH_TABLE -#include "st.h" +#include "ruby/st.h" typedef struct { unsigned char* s; diff --git a/ruby.c b/ruby.c index 61ba65baa9d859..fb9c5595d82690 100644 --- a/ruby.c +++ b/ruby.c @@ -17,11 +17,11 @@ #endif #ifdef _WIN32_WCE #include -#include "wince.h" +#include "ruby/wince.h" #endif -#include "ruby.h" +#include "ruby/ruby.h" +#include "ruby/node.h" #include "dln.h" -#include "node.h" #include #include #include @@ -40,7 +40,7 @@ # define MAXPATHLEN 1024 #endif -#include "util.h" +#include "ruby/util.h" #ifndef HAVE_STDLIB_H char *getenv(); diff --git a/signal.c b/signal.c index ca96d22895435d..e785b6fb969520 100644 --- a/signal.c +++ b/signal.c @@ -12,9 +12,9 @@ **********************************************************************/ -#include "ruby.h" -#include "rubysig.h" -#include "node.h" +#include "ruby/ruby.h" +#include "ruby/signal.h" +#include "ruby/node.h" #include "yarvcore.h" #include #include diff --git a/sprintf.c b/sprintf.c index 41661f1134e9b1..5aeb03875a1530 100644 --- a/sprintf.c +++ b/sprintf.c @@ -12,8 +12,8 @@ **********************************************************************/ -#include "ruby.h" -#include "re.h" +#include "ruby/ruby.h" +#include "ruby/re.h" #include #include #include diff --git a/st.c b/st.c index 451d0c0d10b473..880989aa34e88f 100644 --- a/st.c +++ b/st.c @@ -2,19 +2,20 @@ /* static char sccsid[] = "@(#) st.c 5.1 89/12/14 Crucible"; */ -#include "config.h" #include #ifdef HAVE_STDLIB_H #include #endif #include -#include "defines.h" #ifdef NOT_RUBY #include "regint.h" -#endif - #include "st.h" +#else +#include "ruby/config.h" +#include "ruby/defines.h" +#include "ruby/st.h" +#endif typedef struct st_table_entry st_table_entry; diff --git a/string.c b/string.c index 77f334abfc1930..f5717b92319cf1 100644 --- a/string.c +++ b/string.c @@ -12,8 +12,8 @@ **********************************************************************/ -#include "ruby.h" -#include "re.h" +#include "ruby/ruby.h" +#include "ruby/re.h" #define BEG(no) regs->beg[no] #define END(no) regs->end[no] diff --git a/struct.c b/struct.c index 188910be488e5b..dba40263625863 100644 --- a/struct.c +++ b/struct.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" VALUE rb_cStruct; diff --git a/time.c b/time.c index 5a806ecab42e98..21d8bbd45d68c5 100644 --- a/time.c +++ b/time.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include #include diff --git a/unicode.c b/unicode.c index c81f73006fae38..a85b3212af2662 100644 --- a/unicode.c +++ b/unicode.c @@ -10787,7 +10787,7 @@ onigenc_utf16_32_get_ctype_code_range(int ctype, OnigCodePoint* sb_out, return onigenc_unicode_ctype_code_range(ctype, ranges); } -#include "st.h" +#include "ruby/st.h" #define PROPERTY_NAME_MAX_SIZE 20 diff --git a/util.c b/util.c index e9e53ed4b3ea06..b309598517894a 100644 --- a/util.c +++ b/util.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include #include @@ -22,7 +22,7 @@ #include "missing/file.h" #endif -#include "util.h" +#include "ruby/util.h" unsigned long ruby_scan_oct(const char *start, int len, int *retlen) diff --git a/variable.c b/variable.c index af29934ae8de57..09593834a30742 100644 --- a/variable.c +++ b/variable.c @@ -12,10 +12,10 @@ **********************************************************************/ -#include "ruby.h" -#include "node.h" -#include "st.h" -#include "util.h" +#include "ruby/ruby.h" +#include "ruby/node.h" +#include "ruby/st.h" +#include "ruby/util.h" void rb_vm_change_state(void); st_table *rb_global_tbl; diff --git a/version.c b/version.c index 794f6215959b03..8db37ecd3d7f50 100644 --- a/version.c +++ b/version.c @@ -10,7 +10,7 @@ **********************************************************************/ -#include "ruby.h" +#include "ruby/ruby.h" #include "version.h" #include diff --git a/version.h b/version.h index c27ab92bcd0d15..f8d4d766482a48 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-06-08" +#define RUBY_RELEASE_DATE "2007-06-10" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20070608 +#define RUBY_RELEASE_CODE 20070610 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 8 +#define RUBY_RELEASE_DAY 10 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; diff --git a/vm.c b/vm.c index 603d4d0743452b..94d3034dbf7f65 100644 --- a/vm.c +++ b/vm.c @@ -9,9 +9,9 @@ **********************************************************************/ -#include "ruby.h" -#include "node.h" -#include "st.h" +#include "ruby/ruby.h" +#include "ruby/node.h" +#include "ruby/st.h" #include "gc.h" #include "yarvcore.h" diff --git a/vm_dump.c b/vm_dump.c index f5baefbd7a6248..815a03e38c12d1 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -10,8 +10,8 @@ **********************************************************************/ -#include -#include +#include "ruby/ruby.h" +#include "ruby/node.h" #include "yarvcore.h" #include "vm.h" diff --git a/win32/Makefile.sub b/win32/Makefile.sub index b27866adb3991b..88bf4f8958c3b3 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -34,7 +34,6 @@ iconinc=-I$(icondirs: = -I) !endif ############### -VPATH = $(srcdir);$(srcdir)/missing;$(srcdir)/win32 .SUFFIXES: .y .def .lib !if !defined(CC) @@ -92,6 +91,8 @@ OS = mswin32 !error RT not defined. Retry from configure pass. !endif +arch = $(ARCH)-$(OS) + !ifndef RUBY_SO_NAME RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR) !endif @@ -150,7 +151,7 @@ ARFLAGS = -machine:$(MACHINE) -out: CC = $(CC) -nologo LD = $(CC) LDSHARED = $(LD) -LD -XCFLAGS = -DRUBY_EXPORT -I. -I$(srcdir) -I$(srcdir)/missing +XCFLAGS = -DRUBY_EXPORT -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)/missing !if $(MSC_VER) >= 1400 # Prevents VC++ 2005 (cl ver 14) warnings CPPFLAGS = $(CPPFLAGS) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE @@ -199,6 +200,10 @@ INSTALLED_LIST= .installed.list WINMAINOBJ = winmain.$(OBJEXT) MINIOBJS = dmydln.$(OBJEXT) +arch_hdrdir = $(EXTOUT)/include/$(arch) +hdrdir = $(srcdir)/include +VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(srcdir)/win32 + all: $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk ruby: $(PROGRAM) @@ -210,6 +215,7 @@ $(MKFILES): $(srcdir)/win32/Makefile.sub $(srcdir)/win32/configure.bat $(srcdir) $(COMSPEC) /C $(srcdir:/=\)\win32\configure.bat $(configure_args) @echo $(MKFILES) should be updated, re-run $(MAKE). +RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h CONFIG_H = ./.config.h.time config: config.status @@ -218,9 +224,15 @@ config.status: $(CONFIG_H) $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub @echo Creating config.h - @$(COMSPEC) /C $(srcdir:/=\)\win32\ifchange.bat config.h << +!if !exist("$(arch_hdrdir)") + @md $(arch_hdrdir:/=\) +!endif +!if !exist("$(arch_hdrdir)/ruby") + @md $(arch_hdrdir:/=\)\ruby +!endif + @$(COMSPEC) /C $(srcdir:/=\)\win32\ifchange.bat $(RUBY_CONFIG_H:/=\) << #if _MSC_VER != $(MSC_VER) -#error MSC version unmatch +#error MSC version unmatch: _MSC_VER: $(MSC_VER) is expected. #endif #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 @@ -329,25 +341,24 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub #define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR)" #define RUBY_SITE_LIB "/lib/ruby/site_ruby" #define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)" -#define RUBY_PLATFORM "$(ARCH)-$(OS)" +#define RUBY_PLATFORM "$(arch)" #define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)" #define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(RT)" << @exit > $(@:/=\) -#!if exist(config.h) +#!if exist($(RUBY_CONFIG_H)) #! if exist(config_h.bak) -# @del config_h.bak +# @del $(RUBY_CONFIG_H:.h=_h).bak #! endif -# @ren config.h config_h.bak +# @copy $(RUBY_CONFIG_H) $(RUBY_CONFIG_H:.h=_h).bak #!endif -# @ren config_h~ config.h -#!if exist(config.h) +#!if exist($(RUBY_CONFIG_H)) # @echo NMAKE will abort if config.h is changed, then restart NMAKE. -# @fc.exe config.h config_h.bak > nul -# @echo config.h unchanged. -# @del config.h -# @ren config_h.bak config.h +# @fc.exe $(RUBY_CONFIG_H) $(RUBY_CONFIG_H:.h=_h).bak > nul +# @echo $(RUBY_CONFIG_H) unchanged. +# @del $(RUBY_CONFIG_H) +# @ren $(RUBY_CONFIG_H:.h=_h).bak $(RUBY_CONFIG_H) #!endif config.status: $(MKFILES) $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk @@ -456,7 +467,7 @@ s,@LINK_SO@,@$$(RM) $$(@:/=\).manifest,;t t s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t s,@COMPILE_RULES@,{$$(hdrdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(srcdir)}.%s{}.%s: .%s.%s:,;t t -s,@RULE_SUBST@,{.;$$(srcdir);$$(topdir);$$(hdrdir)}%s,;t t +s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t s,@COMMON_LIBS@,m,;t t s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN,;t t @@ -557,7 +568,7 @@ lex.c: {$(srcdir)}lex.c.blt sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $@ @del y.tab.c -$(OBJS): {$(srcdir)}win32/win32.h +$(OBJS): {$(hdrdir)/ruby}win32.h dir.$(OBJEXT) win32.$(OBJEXT): {$(srcdir)}win32/dir.h diff --git a/win32/mkexports.rb b/win32/mkexports.rb index 2fe867eb1bc9df..7ef12cdffd7435 100755 --- a/win32/mkexports.rb +++ b/win32/mkexports.rb @@ -40,7 +40,7 @@ def initialize(objs) syms[internal] = export winapis[$1] = internal if /^_?(rb_w32_\w+)(?:@\d+)?$/ =~ internal end - win32h = File.join(File.dirname(__FILE__), "win32.h") + win32h = File.join(File.dirname(File.dirname(__FILE__)), "include/ruby/win32.h") IO.foreach(win32h) do |line| if /^#define (\w+)\((.*?)\)\s+(?:\(void\))?(rb_w32_\w+)\((.*?)\)\s*$/ =~ line and $2.delete(" ") == $4.delete(" ") @@ -80,7 +80,7 @@ def symbols() class Exports::Mswin < Exports def each_export(objs) - noprefix = ($arch and /^sh/ !~ $arch) + noprefix = ($arch ||= nil and /^sh/ !~ $arch) objs = objs.collect {|s| s.tr('/', '\\')} filetype = nil IO.popen(%w"dumpbin -symbols -exports" + objs) do |f| diff --git a/win32/win32.c b/win32/win32.c index fef6e49d3709e1..9824f1019a5491 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -10,8 +10,8 @@ * */ -#include "ruby.h" -#include "rubysig.h" +#include "ruby/ruby.h" +#include "ruby/signal.h" #include "dln.h" #include #include @@ -30,7 +30,7 @@ #ifdef __MINGW32__ #include #endif -#include "win32.h" +#include "ruby/win32.h" #include "win32/dir.h" #ifdef _WIN32_WCE #include "wince.h" diff --git a/yarvcore.c b/yarvcore.c index 6c4f83294c4fd4..f9525e104b9de4 100644 --- a/yarvcore.c +++ b/yarvcore.c @@ -10,8 +10,8 @@ **********************************************************************/ -#include "ruby.h" -#include "node.h" +#include "ruby/ruby.h" +#include "ruby/node.h" #include "yarvcore.h" #include "gc.h" diff --git a/yarvcore.h b/yarvcore.h index bb4cfcf0869bf8..1c7007ad427a4b 100644 --- a/yarvcore.h +++ b/yarvcore.h @@ -17,10 +17,10 @@ #include -#include "ruby.h" -#include "rubysig.h" -#include "st.h" -#include "node.h" +#include "ruby/ruby.h" +#include "ruby/signal.h" +#include "ruby/st.h" +#include "ruby/node.h" #include "debug.h" #include "vm_opts.h"