summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/objspace/objspace.c2
-rw-r--r--ext/objspace/objspace_dump.c2
-rw-r--r--ext/pty/pty.c2
-rw-r--r--include/ruby/encoding.h4
-rw-r--r--include/ruby/io.h4
-rw-r--r--marshal.c2
-rw-r--r--process.c3
-rw-r--r--thread.c3
8 files changed, 16 insertions, 6 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 0873ef9bcb..e410941c7d 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -12,9 +12,9 @@
**********************************************************************/
+#include <ruby/io.h>
#include "internal.h"
#include <ruby/st.h>
-#include <ruby/io.h>
#include <ruby/re.h>
#include "node.h"
#include "gc.h"
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
index 19ba1f2e8b..8bd7c6769b 100644
--- a/ext/objspace/objspace_dump.c
+++ b/ext/objspace/objspace_dump.c
@@ -12,9 +12,9 @@
**********************************************************************/
+#include "ruby/io.h"
#include "internal.h"
#include "ruby/debug.h"
-#include "ruby/io.h"
#include "gc.h"
#include "node.h"
#include "vm_core.h"
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 7726f154eb..fb9ff19a94 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -35,8 +35,8 @@
#endif
#include <ctype.h>
-#include "internal.h"
#include "ruby/io.h"
+#include "internal.h"
#include "ruby/util.h"
#include <signal.h>
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index e6ceb19cdf..0c7e1e3d6a 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -12,6 +12,10 @@
#ifndef RUBY_ENCODING_H
#define RUBY_ENCODING_H 1
+#ifdef RUBY_INTERNAL_H
+#error "Include this file before internal.h"
+#endif
+
#if defined(__cplusplus)
extern "C" {
#if 0
diff --git a/include/ruby/io.h b/include/ruby/io.h
index 60d6f6d32e..cde932ff32 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -12,6 +12,10 @@
#ifndef RUBY_IO_H
#define RUBY_IO_H 1
+#ifdef RUBY_INTERNAL_H
+#error "Include this file before internal.h"
+#endif
+
#if defined(__cplusplus)
extern "C" {
#if 0
diff --git a/marshal.c b/marshal.c
index 1593ca2930..389005eb22 100644
--- a/marshal.c
+++ b/marshal.c
@@ -13,8 +13,8 @@
# error too old GCC
#endif
-#include "internal.h"
#include "ruby/io.h"
+#include "internal.h"
#include "ruby/st.h"
#include "ruby/util.h"
#include "encindex.h"
diff --git a/process.c b/process.c
index 79708b4d00..7bd9c1e5da 100644
--- a/process.c
+++ b/process.c
@@ -11,8 +11,9 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/config.h"
#include "ruby/io.h"
+#include "internal.h"
#include "ruby/thread.h"
#include "ruby/util.h"
#include "vm_core.h"
diff --git a/thread.c b/thread.c
index c7d48c01db..3064c68e4f 100644
--- a/thread.c
+++ b/thread.c
@@ -63,10 +63,11 @@
/* for model 2 */
+#include "ruby/config.h"
+#include "ruby/io.h"
#include "eval_intern.h"
#include "gc.h"
#include "timev.h"
-#include "ruby/io.h"
#include "ruby/thread.h"
#include "ruby/thread_native.h"
#include "ruby/debug.h"