From 1dfaa60fabb24a9ff961e485b6134d4ce3a39e99 Mon Sep 17 00:00:00 2001 From: kazu Date: Tue, 9 Jan 2018 12:35:12 +0000 Subject: Include ruby/{io,encoding}.h before internal.h because of r61712 and r61713 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/objspace/objspace.c | 2 +- ext/objspace/objspace_dump.c | 2 +- ext/pty/pty.c | 2 +- include/ruby/encoding.h | 4 ++++ include/ruby/io.h | 4 ++++ marshal.c | 2 +- process.c | 3 ++- thread.c | 3 ++- 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 #include "internal.h" #include -#include #include #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 -#include "internal.h" #include "ruby/io.h" +#include "internal.h" #include "ruby/util.h" #include 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" -- cgit v1.2.3