summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-15 11:49:06 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-15 11:49:06 (GMT)
commit7cd76ab0c579ee5400d0d33753369e675b497d36 (patch)
treed35212b88b3af66efc3eada3fd4c4e114317d431
parent64f9f1ba5884975ba91abcdb7697988ba0ba64bf (diff)
* internal.h: Include ruby.h and ruby/encoding.h to be
includable without prior inclusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--array.c4
-rw-r--r--bignum.c3
-rw-r--r--class.c3
-rw-r--r--common.mk100
-rw-r--r--compile.c1
-rw-r--r--complex.c1
-rw-r--r--cont.c1
-rw-r--r--dir.c2
-rw-r--r--encoding.c2
-rw-r--r--enum.c3
-rw-r--r--enumerator.c3
-rw-r--r--error.c4
-rw-r--r--eval.c3
-rw-r--r--ext/-test-/bignum/big2str.c1
-rw-r--r--ext/-test-/bignum/bigzero.c1
-rw-r--r--ext/-test-/bignum/depend12
-rw-r--r--ext/-test-/bignum/div.c1
-rw-r--r--ext/-test-/bignum/intpack.c1
-rw-r--r--ext/-test-/bignum/mul.c1
-rw-r--r--ext/-test-/bignum/str2big.c1
-rw-r--r--ext/-test-/rational/depend5
-rw-r--r--ext/-test-/rational/rat.c1
-rw-r--r--ext/-test-/string/depend2
-rw-r--r--ext/-test-/string/normalize.c1
-rw-r--r--ext/coverage/depend2
-rw-r--r--ext/objspace/depend5
-rw-r--r--ext/objspace/object_tracing.c3
-rw-r--r--ext/objspace/objspace.c3
-rw-r--r--ext/objspace/objspace_dump.c4
-rw-r--r--ext/pty/depend1
-rw-r--r--ext/pty/pty.c3
-rw-r--r--ext/readline/depend1
-rw-r--r--ext/readline/readline.c3
-rw-r--r--ext/ripper/depend1
-rw-r--r--ext/socket/depend15
-rw-r--r--file.c3
-rw-r--r--gc.c3
-rw-r--r--hash.c4
-rw-r--r--inits.c1
-rw-r--r--internal.h6
-rw-r--r--io.c3
-rw-r--r--iseq.c3
-rw-r--r--load.c3
-rw-r--r--localeinit.c2
-rw-r--r--marshal.c4
-rw-r--r--math.c1
-rw-r--r--numeric.c4
-rw-r--r--object.c4
-rw-r--r--pack.c2
-rw-r--r--process.c3
-rw-r--r--random.c1
-rw-r--r--range.c2
-rw-r--r--rational.c1
-rw-r--r--re.c4
-rw-r--r--ruby.c2
-rw-r--r--signal.c3
-rw-r--r--sprintf.c4
-rw-r--r--st.c1
-rw-r--r--string.c4
-rw-r--r--struct.c1
-rw-r--r--symbol.c4
-rw-r--r--time.c4
-rw-r--r--transcode.c2
-rw-r--r--util.c1
-rw-r--r--variable.c4
-rw-r--r--vm.c4
-rw-r--r--vm_backtrace.c4
-rw-r--r--vm_dump.c3
-rw-r--r--vm_trace.c4
70 files changed, 186 insertions, 116 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b711e9..f968df1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Nov 15 20:34:23 2014 Tanaka Akira <akr@fsij.org>
+
+ * internal.h: Include ruby.h and ruby/encoding.h to be
+ includable without prior inclusion.
+
Sat Nov 15 20:46:44 2014 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_document.rb
diff --git a/array.c b/array.c
index 04a8286..18cde10 100644
--- a/array.c
+++ b/array.c
@@ -11,11 +11,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/util.h"
#include "ruby/st.h"
-#include "ruby/encoding.h"
-#include "internal.h"
#include "probes.h"
#include "id.h"
diff --git a/bignum.c b/bignum.c
index 74ca5b1..dfbe2ec 100644
--- a/bignum.c
+++ b/bignum.c
@@ -9,10 +9,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/thread.h"
#include "ruby/util.h"
-#include "internal.h"
#ifdef HAVE_STRINGS_H
#include <strings.h>
diff --git a/class.c b/class.c
index c6b659f..9500a1f 100644
--- a/class.c
+++ b/class.c
@@ -23,12 +23,11 @@
* \{
*/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/st.h"
#include "method.h"
#include "constant.h"
#include "vm_core.h"
-#include "internal.h"
#include <ctype.h>
int rb_vm_add_root_module(ID id, VALUE module);
diff --git a/common.mk b/common.mk
index bf65ac0..02fea7c 100644
--- a/common.mk
+++ b/common.mk
@@ -2091,4 +2091,104 @@ vm_trace.$(OBJEXT): {$(VPATH)}thread_native.h
vm_trace.$(OBJEXT): {$(VPATH)}vm_core.h
vm_trace.$(OBJEXT): {$(VPATH)}vm_debug.h
vm_trace.$(OBJEXT): {$(VPATH)}vm_opts.h
+array.$(OBJEXT): $(hdrdir)/ruby.h
+bignum.$(OBJEXT): $(hdrdir)/ruby.h
+bignum.$(OBJEXT): {$(VPATH)}encoding.h
+bignum.$(OBJEXT): {$(VPATH)}oniguruma.h
+class.$(OBJEXT): $(hdrdir)/ruby.h
+class.$(OBJEXT): {$(VPATH)}encoding.h
+class.$(OBJEXT): {$(VPATH)}oniguruma.h
+compile.$(OBJEXT): $(hdrdir)/ruby.h
+compile.$(OBJEXT): {$(VPATH)}encoding.h
+compile.$(OBJEXT): {$(VPATH)}oniguruma.h
+complex.$(OBJEXT): {$(VPATH)}encoding.h
+complex.$(OBJEXT): {$(VPATH)}oniguruma.h
+cont.$(OBJEXT): $(hdrdir)/ruby.h
+cont.$(OBJEXT): {$(VPATH)}encoding.h
+cont.$(OBJEXT): {$(VPATH)}oniguruma.h
+debug.$(OBJEXT): $(hdrdir)/ruby.h
+dir.$(OBJEXT): $(hdrdir)/ruby.h
+encoding.$(OBJEXT): $(hdrdir)/ruby.h
+enum.$(OBJEXT): $(hdrdir)/ruby.h
+enum.$(OBJEXT): {$(VPATH)}encoding.h
+enum.$(OBJEXT): {$(VPATH)}oniguruma.h
+enumerator.$(OBJEXT): $(hdrdir)/ruby.h
+enumerator.$(OBJEXT): {$(VPATH)}encoding.h
+enumerator.$(OBJEXT): {$(VPATH)}oniguruma.h
+error.$(OBJEXT): $(hdrdir)/ruby.h
+eval.$(OBJEXT): $(hdrdir)/ruby.h
+file.$(OBJEXT): $(hdrdir)/ruby.h
+gc.$(OBJEXT): $(hdrdir)/ruby.h
+golf_prelude.$(OBJEXT): $(hdrdir)/ruby.h
+golf_prelude.$(OBJEXT): {$(VPATH)}encoding.h
+golf_prelude.$(OBJEXT): {$(VPATH)}oniguruma.h
+hash.$(OBJEXT): $(hdrdir)/ruby.h
+inits.$(OBJEXT): $(hdrdir)/ruby.h
+inits.$(OBJEXT): {$(VPATH)}encoding.h
+inits.$(OBJEXT): {$(VPATH)}oniguruma.h
+io.$(OBJEXT): $(hdrdir)/ruby.h
+iseq.$(OBJEXT): $(hdrdir)/ruby.h
+iseq.$(OBJEXT): {$(VPATH)}encoding.h
+iseq.$(OBJEXT): {$(VPATH)}oniguruma.h
+load.$(OBJEXT): $(hdrdir)/ruby.h
+load.$(OBJEXT): {$(VPATH)}encoding.h
+load.$(OBJEXT): {$(VPATH)}oniguruma.h
+localeinit.$(OBJEXT): $(hdrdir)/ruby.h
+marshal.$(OBJEXT): $(hdrdir)/ruby.h
+math.$(OBJEXT): $(hdrdir)/ruby.h
+math.$(OBJEXT): {$(VPATH)}encoding.h
+math.$(OBJEXT): {$(VPATH)}oniguruma.h
+miniprelude.$(OBJEXT): $(hdrdir)/ruby.h
+miniprelude.$(OBJEXT): {$(VPATH)}encoding.h
+miniprelude.$(OBJEXT): {$(VPATH)}oniguruma.h
+node.$(OBJEXT): $(hdrdir)/ruby.h
+node.$(OBJEXT): {$(VPATH)}encoding.h
+node.$(OBJEXT): {$(VPATH)}oniguruma.h
+numeric.$(OBJEXT): $(hdrdir)/ruby.h
+object.$(OBJEXT): $(hdrdir)/ruby.h
+pack.$(OBJEXT): $(hdrdir)/ruby.h
+parse.$(OBJEXT): $(hdrdir)/ruby.h
+prelude.$(OBJEXT): $(hdrdir)/ruby.h
+prelude.$(OBJEXT): {$(VPATH)}encoding.h
+prelude.$(OBJEXT): {$(VPATH)}oniguruma.h
+proc.$(OBJEXT): $(hdrdir)/ruby.h
+proc.$(OBJEXT): {$(VPATH)}encoding.h
+proc.$(OBJEXT): {$(VPATH)}oniguruma.h
+process.$(OBJEXT): $(hdrdir)/ruby.h
+random.$(OBJEXT): $(hdrdir)/ruby.h
+random.$(OBJEXT): {$(VPATH)}encoding.h
+random.$(OBJEXT): {$(VPATH)}oniguruma.h
+range.$(OBJEXT): $(hdrdir)/ruby.h
+rational.$(OBJEXT): {$(VPATH)}encoding.h
+rational.$(OBJEXT): {$(VPATH)}oniguruma.h
+re.$(OBJEXT): $(hdrdir)/ruby.h
+ruby.$(OBJEXT): $(hdrdir)/ruby.h
+safe.$(OBJEXT): $(hdrdir)/ruby.h
+safe.$(OBJEXT): {$(VPATH)}encoding.h
+safe.$(OBJEXT): {$(VPATH)}oniguruma.h
+signal.$(OBJEXT): $(hdrdir)/ruby.h
+signal.$(OBJEXT): {$(VPATH)}encoding.h
+signal.$(OBJEXT): {$(VPATH)}oniguruma.h
+sprintf.$(OBJEXT): $(hdrdir)/ruby.h
+st.$(OBJEXT): $(hdrdir)/ruby.h
+st.$(OBJEXT): {$(VPATH)}encoding.h
+st.$(OBJEXT): {$(VPATH)}oniguruma.h
+string.$(OBJEXT): $(hdrdir)/ruby.h
+struct.$(OBJEXT): $(hdrdir)/ruby.h
+struct.$(OBJEXT): {$(VPATH)}encoding.h
+struct.$(OBJEXT): {$(VPATH)}oniguruma.h
+symbol.$(OBJEXT): $(hdrdir)/ruby.h
+thread.$(OBJEXT): $(hdrdir)/ruby.h
+time.$(OBJEXT): $(hdrdir)/ruby.h
+transcode.$(OBJEXT): $(hdrdir)/ruby.h
+util.$(OBJEXT): $(hdrdir)/ruby.h
+util.$(OBJEXT): {$(VPATH)}encoding.h
+util.$(OBJEXT): {$(VPATH)}oniguruma.h
+variable.$(OBJEXT): $(hdrdir)/ruby.h
+vm.$(OBJEXT): $(hdrdir)/ruby.h
+vm_backtrace.$(OBJEXT): $(hdrdir)/ruby.h
+vm_dump.$(OBJEXT): $(hdrdir)/ruby.h
+vm_dump.$(OBJEXT): {$(VPATH)}encoding.h
+vm_dump.$(OBJEXT): {$(VPATH)}oniguruma.h
+vm_trace.$(OBJEXT): $(hdrdir)/ruby.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/compile.c b/compile.c
index 1f2bed7..4e4101f 100644
--- a/compile.c
+++ b/compile.c
@@ -9,7 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "internal.h"
#include <math.h>
diff --git a/complex.c b/complex.c
index b65bc8a..87f96f4 100644
--- a/complex.c
+++ b/complex.c
@@ -5,7 +5,6 @@
which is written in ruby.
*/
-#include "ruby.h"
#include "internal.h"
#include <math.h>
diff --git a/cont.c b/cont.c
index 08acf40..3910ca2 100644
--- a/cont.c
+++ b/cont.c
@@ -9,7 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "internal.h"
#include "vm_core.h"
#include "gc.h"
diff --git a/dir.c b/dir.c
index 82df721..778a637 100644
--- a/dir.c
+++ b/dir.c
@@ -11,8 +11,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
#include "internal.h"
#include <sys/types.h>
diff --git a/encoding.c b/encoding.c
index a7301a1..1e3ca07 100644
--- a/encoding.c
+++ b/encoding.c
@@ -9,8 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
#include "internal.h"
#include "regenc.h"
#include <ctype.h>
diff --git a/enum.c b/enum.c
index f05c556..64bad8b 100644
--- a/enum.c
+++ b/enum.c
@@ -9,11 +9,10 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/util.h"
#include "node.h"
#include "id.h"
-#include "internal.h"
VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
diff --git a/enumerator.c b/enumerator.c
index 75de8eb..3beedc4 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -12,9 +12,8 @@
************************************************/
-#include "ruby/ruby.h"
-#include "node.h"
#include "internal.h"
+#include "node.h"
/*
* Document-class: Enumerator
diff --git a/error.c b/error.c
index bf4d59a..1e7dac5 100644
--- a/error.c
+++ b/error.c
@@ -9,10 +9,8 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/st.h"
-#include "ruby/encoding.h"
#include "internal.h"
+#include "ruby/st.h"
#include "vm_core.h"
#include <stdio.h>
diff --git a/eval.c b/eval.c
index f8d8268..451588b 100644
--- a/eval.c
+++ b/eval.c
@@ -11,12 +11,11 @@
**********************************************************************/
+#include "internal.h"
#include "eval_intern.h"
#include "iseq.h"
#include "gc.h"
#include "ruby/vm.h"
-#include "ruby/encoding.h"
-#include "internal.h"
#include "vm_core.h"
#include "probes_helper.h"
diff --git a/ext/-test-/bignum/big2str.c b/ext/-test-/bignum/big2str.c
index ce71fe3..ec4bde2 100644
--- a/ext/-test-/bignum/big2str.c
+++ b/ext/-test-/bignum/big2str.c
@@ -1,4 +1,3 @@
-#include "ruby.h"
#include "internal.h"
static VALUE
diff --git a/ext/-test-/bignum/bigzero.c b/ext/-test-/bignum/bigzero.c
index a3bf8af..35117db 100644
--- a/ext/-test-/bignum/bigzero.c
+++ b/ext/-test-/bignum/bigzero.c
@@ -1,4 +1,3 @@
-#include "ruby.h"
#include "internal.h"
static VALUE
diff --git a/ext/-test-/bignum/depend b/ext/-test-/bignum/depend
index 8f1660c..b960ff5 100644
--- a/ext/-test-/bignum/depend
+++ b/ext/-test-/bignum/depend
@@ -67,4 +67,16 @@ str2big.o: $(hdrdir)/ruby/missing.h
str2big.o: $(hdrdir)/ruby/ruby.h
str2big.o: $(hdrdir)/ruby/st.h
str2big.o: $(hdrdir)/ruby/subst.h
+big2str.o: $(hdrdir)/ruby/encoding.h
+big2str.o: $(hdrdir)/ruby/oniguruma.h
+bigzero.o: $(hdrdir)/ruby/encoding.h
+bigzero.o: $(hdrdir)/ruby/oniguruma.h
+div.o: $(hdrdir)/ruby/encoding.h
+div.o: $(hdrdir)/ruby/oniguruma.h
+intpack.o: $(hdrdir)/ruby/encoding.h
+intpack.o: $(hdrdir)/ruby/oniguruma.h
+mul.o: $(hdrdir)/ruby/encoding.h
+mul.o: $(hdrdir)/ruby/oniguruma.h
+str2big.o: $(hdrdir)/ruby/encoding.h
+str2big.o: $(hdrdir)/ruby/oniguruma.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/bignum/div.c b/ext/-test-/bignum/div.c
index 2853ebe..a1db21d 100644
--- a/ext/-test-/bignum/div.c
+++ b/ext/-test-/bignum/div.c
@@ -1,4 +1,3 @@
-#include "ruby.h"
#include "internal.h"
static VALUE
diff --git a/ext/-test-/bignum/intpack.c b/ext/-test-/bignum/intpack.c
index b7435b2..2d19442 100644
--- a/ext/-test-/bignum/intpack.c
+++ b/ext/-test-/bignum/intpack.c
@@ -1,4 +1,3 @@
-#include "ruby.h"
#include "internal.h"
static VALUE
diff --git a/ext/-test-/bignum/mul.c b/ext/-test-/bignum/mul.c
index c0514a5..d34e98f 100644
--- a/ext/-test-/bignum/mul.c
+++ b/ext/-test-/bignum/mul.c
@@ -1,4 +1,3 @@
-#include "ruby.h"
#include "internal.h"
static VALUE
diff --git a/ext/-test-/bignum/str2big.c b/ext/-test-/bignum/str2big.c
index 0fdcb53..bc79ef0 100644
--- a/ext/-test-/bignum/str2big.c
+++ b/ext/-test-/bignum/str2big.c
@@ -1,4 +1,3 @@
-#include "ruby.h"
#include "internal.h"
static VALUE
diff --git a/ext/-test-/rational/depend b/ext/-test-/rational/depend
index a435890..a814c2e 100644
--- a/ext/-test-/rational/depend
+++ b/ext/-test-/rational/depend
@@ -1,3 +1,8 @@
$(OBJS): $(HDRS) $(ruby_headers)
rat.o: rat.c $(top_srcdir)/internal.h
+
+# AUTOGENERATED DEPENDENCIES START
+rat.o: $(hdrdir)/ruby/encoding.h
+rat.o: $(hdrdir)/ruby/oniguruma.h
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/rational/rat.c b/ext/-test-/rational/rat.c
index 63ca849..772546f 100644
--- a/ext/-test-/rational/rat.c
+++ b/ext/-test-/rational/rat.c
@@ -1,4 +1,3 @@
-#include "ruby.h"
#include "internal.h"
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
diff --git a/ext/-test-/string/depend b/ext/-test-/string/depend
index 8a1c2c3..ac2bd6f 100644
--- a/ext/-test-/string/depend
+++ b/ext/-test-/string/depend
@@ -89,4 +89,6 @@ set_len.o: $(hdrdir)/ruby/missing.h
set_len.o: $(hdrdir)/ruby/ruby.h
set_len.o: $(hdrdir)/ruby/st.h
set_len.o: $(hdrdir)/ruby/subst.h
+normalize.o: $(hdrdir)/ruby/encoding.h
+normalize.o: $(hdrdir)/ruby/oniguruma.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/string/normalize.c b/ext/-test-/string/normalize.c
index 22bb6d7..2e16a46 100644
--- a/ext/-test-/string/normalize.c
+++ b/ext/-test-/string/normalize.c
@@ -1,4 +1,3 @@
-#include "ruby.h"
#include "internal.h"
#ifdef __APPLE__
diff --git a/ext/coverage/depend b/ext/coverage/depend
index 50c355c..6a14155 100644
--- a/ext/coverage/depend
+++ b/ext/coverage/depend
@@ -15,4 +15,6 @@ coverage.o: $(top_srcdir)/ccan/check_type/check_type.h
coverage.o: $(top_srcdir)/ccan/container_of/container_of.h
coverage.o: $(top_srcdir)/ccan/list/list.h
coverage.o: $(top_srcdir)/ccan/str/str.h
+coverage.o: $(hdrdir)/ruby/encoding.h
+coverage.o: $(hdrdir)/ruby/oniguruma.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/objspace/depend b/ext/objspace/depend
index 23d7081..297e3bd 100644
--- a/ext/objspace/depend
+++ b/ext/objspace/depend
@@ -51,4 +51,9 @@ objspace_dump.o: $(hdrdir)/ruby/missing.h
objspace_dump.o: $(hdrdir)/ruby/ruby.h
objspace_dump.o: $(hdrdir)/ruby/st.h
objspace_dump.o: $(hdrdir)/ruby/subst.h
+object_tracing.o: $(top_srcdir)/include/ruby.h
+object_tracing.o: $(hdrdir)/ruby/encoding.h
+object_tracing.o: $(hdrdir)/ruby/oniguruma.h
+objspace.o: $(top_srcdir)/include/ruby.h
+objspace_dump.o: $(top_srcdir)/include/ruby.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/objspace/object_tracing.c b/ext/objspace/object_tracing.c
index 975518c..3a7f544 100644
--- a/ext/objspace/object_tracing.c
+++ b/ext/objspace/object_tracing.c
@@ -13,10 +13,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/debug.h"
#include "objspace.h"
-#include "internal.h"
struct traceobj_arg {
int running;
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 88ebfca..c423723 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -12,13 +12,12 @@
**********************************************************************/
-#include <ruby/ruby.h>
+#include "internal.h"
#include <ruby/st.h>
#include <ruby/io.h>
#include <ruby/re.h>
#include "node.h"
#include "gc.h"
-#include "internal.h"
/*
* call-seq:
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
index cb8f943..7e082f9 100644
--- a/ext/objspace/objspace_dump.c
+++ b/ext/objspace/objspace_dump.c
@@ -12,15 +12,13 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/debug.h"
-#include "ruby/encoding.h"
#include "ruby/io.h"
#include "gc.h"
#include "node.h"
#include "vm_core.h"
#include "objspace.h"
-#include "internal.h"
static VALUE sym_output, sym_stdout, sym_string, sym_file;
diff --git a/ext/pty/depend b/ext/pty/depend
index 2fec612..8ae219d 100644
--- a/ext/pty/depend
+++ b/ext/pty/depend
@@ -11,4 +11,5 @@ pty.o: $(hdrdir)/ruby/ruby.h
pty.o: $(hdrdir)/ruby/st.h
pty.o: $(hdrdir)/ruby/subst.h
pty.o: $(hdrdir)/ruby/util.h
+pty.o: $(top_srcdir)/include/ruby.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 18983f4..29cc689 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -33,10 +33,9 @@
#endif
#include <ctype.h>
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/io.h"
#include "ruby/util.h"
-#include "internal.h"
#include <signal.h>
#ifdef HAVE_SYS_STROPTS_H
diff --git a/ext/readline/depend b/ext/readline/depend
index 40d1bbd..a5ea0a5 100644
--- a/ext/readline/depend
+++ b/ext/readline/depend
@@ -11,4 +11,5 @@ readline.o: $(hdrdir)/ruby/ruby.h
readline.o: $(hdrdir)/ruby/st.h
readline.o: $(hdrdir)/ruby/subst.h
readline.o: $(hdrdir)/ruby/thread.h
+readline.o: $(top_srcdir)/include/ruby.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index a196399..5e78af4 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -33,10 +33,9 @@
#include <editline/readline.h>
#endif
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/io.h"
#include "ruby/thread.h"
-#include "internal.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
diff --git a/ext/ripper/depend b/ext/ripper/depend
index db2dd15..8559362 100644
--- a/ext/ripper/depend
+++ b/ext/ripper/depend
@@ -68,4 +68,5 @@ ripper.o: $(hdrdir)/ruby/ruby.h
ripper.o: $(hdrdir)/ruby/st.h
ripper.o: $(hdrdir)/ruby/subst.h
ripper.o: $(hdrdir)/ruby/util.h
+ripper.o: $(top_srcdir)/include/ruby.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/socket/depend b/ext/socket/depend
index 9661c0c..2a68d96 100644
--- a/ext/socket/depend
+++ b/ext/socket/depend
@@ -247,4 +247,19 @@ unixsocket.o: $(hdrdir)/ruby/st.h
unixsocket.o: $(hdrdir)/ruby/subst.h
unixsocket.o: $(hdrdir)/ruby/thread.h
unixsocket.o: $(hdrdir)/ruby/util.h
+ancdata.o: $(top_srcdir)/include/ruby.h
+basicsocket.o: $(top_srcdir)/include/ruby.h
+constants.o: $(top_srcdir)/include/ruby.h
+ifaddr.o: $(top_srcdir)/include/ruby.h
+init.o: $(top_srcdir)/include/ruby.h
+ipsocket.o: $(top_srcdir)/include/ruby.h
+option.o: $(top_srcdir)/include/ruby.h
+raddrinfo.o: $(top_srcdir)/include/ruby.h
+socket.o: $(top_srcdir)/include/ruby.h
+sockssocket.o: $(top_srcdir)/include/ruby.h
+tcpserver.o: $(top_srcdir)/include/ruby.h
+tcpsocket.o: $(top_srcdir)/include/ruby.h
+udpsocket.o: $(top_srcdir)/include/ruby.h
+unixserver.o: $(top_srcdir)/include/ruby.h
+unixsocket.o: $(top_srcdir)/include/ruby.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/file.c b/file.c
index 0bd9f7a..d47db55 100644
--- a/file.c
+++ b/file.c
@@ -23,11 +23,10 @@
#include <CoreFoundation/CFString.h>
#endif
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/io.h"
#include "ruby/util.h"
#include "dln.h"
-#include "internal.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
diff --git a/gc.c b/gc.c
index 6c7511c..d6aaf2e 100644
--- a/gc.c
+++ b/gc.c
@@ -11,7 +11,7 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/st.h"
#include "ruby/re.h"
#include "ruby/io.h"
@@ -20,7 +20,6 @@
#include "ruby/debug.h"
#include "eval_intern.h"
#include "vm_core.h"
-#include "internal.h"
#include "gc.h"
#include "constant.h"
#include "ruby_atomic.h"
diff --git a/hash.c b/hash.c
index a7fd5cb..bd6134d 100644
--- a/hash.c
+++ b/hash.c
@@ -11,11 +11,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/st.h"
#include "ruby/util.h"
-#include "ruby/encoding.h"
-#include "internal.h"
#include <errno.h>
#include "probes.h"
#include "id.h"
diff --git a/inits.c b/inits.c
index 458eb64..12b2d52 100644
--- a/inits.c
+++ b/inits.c
@@ -9,7 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "internal.h"
#define CALL(n) {void Init_##n(void); Init_##n();}
diff --git a/internal.h b/internal.h
index f106f4c..0025355 100644
--- a/internal.h
+++ b/internal.h
@@ -12,6 +12,9 @@
#ifndef RUBY_INTERNAL_H
#define RUBY_INTERNAL_H 1
+#include "ruby.h"
+#include "ruby/encoding.h"
+
#if defined(__cplusplus)
extern "C" {
#if 0
@@ -568,7 +571,6 @@ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
void Init_ext(void);
/* encoding.c */
-#ifdef RUBY_ENCODING_H
enum ruby_preserved_encindex {
ENCINDEX_ASCII,
ENCINDEX_UTF_8,
@@ -589,7 +591,7 @@ enum ruby_preserved_encindex {
ENCINDEX_BUILTIN_MAX
};
-#endif
+
#define rb_ascii8bit_encindex() ENCINDEX_ASCII
#define rb_utf8_encindex() ENCINDEX_UTF_8
#define rb_usascii_encindex() ENCINDEX_US_ASCII
diff --git a/io.c b/io.c
index fb6b95d..7845cec 100644
--- a/io.c
+++ b/io.c
@@ -11,11 +11,10 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/io.h"
#include "ruby/thread.h"
#include "dln.h"
-#include "internal.h"
#include "id.h"
#include <ctype.h>
#include <errno.h>
diff --git a/iseq.c b/iseq.c
index 0ebf2a8..08a7918 100644
--- a/iseq.c
+++ b/iseq.c
@@ -9,9 +9,8 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/util.h"
#include "internal.h"
+#include "ruby/util.h"
#include "eval_intern.h"
/* #define RUBY_MARK_FREE_DEBUG 1 */
diff --git a/load.c b/load.c
index e6a7be4..445dcff 100644
--- a/load.c
+++ b/load.c
@@ -2,9 +2,8 @@
* load methods from eval.c
*/
-#include "ruby/ruby.h"
-#include "ruby/util.h"
#include "internal.h"
+#include "ruby/util.h"
#include "dln.h"
#include "eval_intern.h"
#include "probes.h"
diff --git a/localeinit.c b/localeinit.c
index 51a06c5..a21b6b1 100644
--- a/localeinit.c
+++ b/localeinit.c
@@ -9,8 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
#include "internal.h"
#ifdef __CYGWIN__
#include <windows.h>
diff --git a/marshal.c b/marshal.c
index 14069fb..f9ba815 100644
--- a/marshal.c
+++ b/marshal.c
@@ -13,12 +13,10 @@
# error too old GCC
#endif
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/io.h"
#include "ruby/st.h"
#include "ruby/util.h"
-#include "ruby/encoding.h"
-#include "internal.h"
#include <math.h>
#ifdef HAVE_FLOAT_H
diff --git a/math.c b/math.c
index a09d605..9aff663 100644
--- a/math.c
+++ b/math.c
@@ -9,7 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "internal.h"
#include <float.h>
#include <math.h>
diff --git a/numeric.c b/numeric.c
index 2fdfaaf..36a2c18 100644
--- a/numeric.c
+++ b/numeric.c
@@ -9,10 +9,8 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
-#include "ruby/util.h"
#include "internal.h"
+#include "ruby/util.h"
#include "id.h"
#include <ctype.h>
#include <math.h>
diff --git a/object.c b/object.c
index f2f6460..372254e 100644
--- a/object.c
+++ b/object.c
@@ -11,17 +11,15 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/st.h"
#include "ruby/util.h"
-#include "ruby/encoding.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include "constant.h"
-#include "internal.h"
#include "id.h"
#include "probes.h"
diff --git a/pack.c b/pack.c
index 728c1d1..54f5303 100644
--- a/pack.c
+++ b/pack.c
@@ -9,8 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
#include "internal.h"
#include <sys/types.h>
#include <ctype.h>
diff --git a/process.c b/process.c
index 301735d..4e92fcc 100644
--- a/process.c
+++ b/process.c
@@ -11,11 +11,10 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/io.h"
#include "ruby/thread.h"
#include "ruby/util.h"
-#include "internal.h"
#include "vm_core.h"
#include <stdio.h>
diff --git a/random.c b/random.c
index a1deecf..f38af6f 100644
--- a/random.c
+++ b/random.c
@@ -59,7 +59,6 @@ The original copyright notice follows.
email: matumoto@math.keio.ac.jp
*/
-#include "ruby/ruby.h"
#include "internal.h"
#include <limits.h>
diff --git a/range.c b/range.c
index 0a67b6f..f4ab7e1 100644
--- a/range.c
+++ b/range.c
@@ -9,8 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
#include "internal.h"
#include "id.h"
diff --git a/rational.c b/rational.c
index 23b4bb0..addb195 100644
--- a/rational.c
+++ b/rational.c
@@ -5,7 +5,6 @@
which is written in ruby.
*/
-#include "ruby.h"
#include "internal.h"
#include <math.h>
#include <float.h>
diff --git a/re.c b/re.c
index 588eb9c..917683f 100644
--- a/re.c
+++ b/re.c
@@ -9,11 +9,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/re.h"
-#include "ruby/encoding.h"
#include "ruby/util.h"
-#include "internal.h"
#include "regint.h"
#include <ctype.h>
diff --git a/ruby.c b/ruby.c
index e5c4f8f..3894892 100644
--- a/ruby.c
+++ b/ruby.c
@@ -15,8 +15,6 @@
#include <windows.h>
#include <sys/cygwin.h>
#endif
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
#include "internal.h"
#include "eval_intern.h"
#include "dln.h"
diff --git a/signal.c b/signal.c
index a3f4a20..6d4a4f3 100644
--- a/signal.c
+++ b/signal.c
@@ -11,14 +11,13 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "vm_core.h"
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include "ruby_atomic.h"
#include "eval_intern.h"
-#include "internal.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
diff --git a/sprintf.c b/sprintf.c
index d370b8d..e129272 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -11,10 +11,8 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/re.h"
-#include "ruby/encoding.h"
#include "internal.h"
+#include "ruby/re.h"
#include "id.h"
#include <math.h>
#include <stdarg.h>
diff --git a/st.c b/st.c
index e778b69..b7f66d0 100644
--- a/st.c
+++ b/st.c
@@ -6,7 +6,6 @@
#include "regint.h"
#include "st.h"
#else
-#include "ruby/ruby.h"
#include "internal.h"
#endif
diff --git a/string.c b/string.c
index c8ed9fd..bd03575 100644
--- a/string.c
+++ b/string.c
@@ -11,10 +11,8 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/re.h"
-#include "ruby/encoding.h"
#include "internal.h"
+#include "ruby/re.h"
#include "probes.h"
#include "gc.h"
#include <assert.h>
diff --git a/struct.c b/struct.c
index b550be9..cbc4028 100644
--- a/struct.c
+++ b/struct.c
@@ -9,7 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "internal.h"
VALUE rb_cStruct;
diff --git a/symbol.c b/symbol.c
index d4d7b5e..8bfe95e 100644
--- a/symbol.c
+++ b/symbol.c
@@ -9,10 +9,8 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/st.h"
-#include "ruby/encoding.h"
#include "internal.h"
+#include "ruby/st.h"
#include "node.h"
#include "symbol.h"
#include "gc.h"
diff --git a/time.c b/time.c
index cef400e..5561f65 100644
--- a/time.c
+++ b/time.c
@@ -9,12 +9,10 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include <sys/types.h>
#include <time.h>
#include <errno.h>
-#include "ruby/encoding.h"
-#include "internal.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
diff --git a/transcode.c b/transcode.c
index 32d9f8d..76724b4 100644
--- a/transcode.c
+++ b/transcode.c
@@ -9,8 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
#include "internal.h"
#include "transcode_data.h"
#include <ctype.h>
diff --git a/util.c b/util.c
index a9e5590..3d476a8 100644
--- a/util.c
+++ b/util.c
@@ -9,7 +9,6 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "internal.h"
#include <ctype.h>
diff --git a/variable.c b/variable.c
index 006de23..816088f 100644
--- a/variable.c
+++ b/variable.c
@@ -11,13 +11,11 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/st.h"
#include "ruby/util.h"
-#include "ruby/encoding.h"
#include "node.h"
#include "constant.h"
-#include "internal.h"
#include "id.h"
st_table *rb_global_tbl;
diff --git a/vm.c b/vm.c
index 92bc666..a495da0 100644
--- a/vm.c
+++ b/vm.c
@@ -8,11 +8,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/vm.h"
#include "ruby/st.h"
-#include "ruby/encoding.h"
-#include "internal.h"
#include "gc.h"
#include "vm_core.h"
diff --git a/vm_backtrace.c b/vm_backtrace.c
index 1a84280..042c282 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -9,11 +9,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
-#include "ruby/encoding.h"
+#include "internal.h"
#include "ruby/debug.h"
-#include "internal.h"
#include "vm_core.h"
#include "eval_intern.h"
#include "iseq.h"
diff --git a/vm_dump.c b/vm_dump.c
index 034b419..10715c9 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -9,10 +9,9 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "addr2line.h"
#include "vm_core.h"
-#include "internal.h"
#include "iseq.h"
/* see vm_insnhelper.h for the values */
diff --git a/vm_trace.c b/vm_trace.c
index 7db15b8..5ee5bca 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -21,11 +21,9 @@
*
*/
-#include "ruby/ruby.h"
+#include "internal.h"
#include "ruby/debug.h"
-#include "ruby/encoding.h"
-#include "internal.h"
#include "vm_core.h"
#include "eval_intern.h"