summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--array.c3
-rw-r--r--compile.c4
-rw-r--r--dir.c3
-rw-r--r--encoding.c1
-rw-r--r--enum.c1
-rw-r--r--error.c3
-rw-r--r--ext/-test-/string/cstr.c1
-rw-r--r--file.c3
-rw-r--r--gc.c1
-rw-r--r--hash.c3
-rw-r--r--internal.h19
-rw-r--r--io.c3
-rw-r--r--load.c3
-rw-r--r--localeinit.c1
-rw-r--r--numeric.c3
-rw-r--r--object.c3
-rw-r--r--pack.c1
-rw-r--r--re.c3
-rw-r--r--ruby.c3
-rw-r--r--sprintf.c3
-rw-r--r--string.c3
-rw-r--r--symbol.c3
-rw-r--r--time.c1
-rw-r--r--transcode.c1
-rw-r--r--variable.c3
-rw-r--r--vm.c1
-rw-r--r--vm_backtrace.c3
-rw-r--r--vm_core.h1
28 files changed, 58 insertions, 23 deletions
diff --git a/array.c b/array.c
index fa88f47..8a3ec0c 100644
--- a/array.c
+++ b/array.c
@@ -11,9 +11,10 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/util.h"
#include "ruby/st.h"
+#include "internal.h"
#include "probes.h"
#include "id.h"
#include "debug_counter.h"
diff --git a/compile.c b/compile.c
index 6d9d0f4..64f88c4 100644
--- a/compile.c
+++ b/compile.c
@@ -9,13 +9,15 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/re.h"
+#include "internal.h"
#include "encindex.h"
#include <math.h>
#define USE_INSN_STACK_INCREASE 1
#include "vm_core.h"
+#include "vm_debug.h"
#include "iseq.h"
#include "insns.inc"
#include "insns_info.inc"
diff --git a/dir.c b/dir.c
index 7d4dc87..ecc2eeb 100644
--- a/dir.c
+++ b/dir.c
@@ -11,9 +11,10 @@
**********************************************************************/
+#include "ruby/encoding.h"
+#include "ruby/thread.h"
#include "internal.h"
#include "encindex.h"
-#include "ruby/thread.h"
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/encoding.c b/encoding.c
index 2043a69..f2f3440 100644
--- a/encoding.c
+++ b/encoding.c
@@ -9,6 +9,7 @@
**********************************************************************/
+#include "ruby/encoding.h"
#include "internal.h"
#include "encindex.h"
#include "regenc.h"
diff --git a/enum.c b/enum.c
index ad34004..9f74e77 100644
--- a/enum.c
+++ b/enum.c
@@ -9,6 +9,7 @@
**********************************************************************/
+#include "ruby/encoding.h"
#include "internal.h"
#include "ruby/util.h"
#include "id.h"
diff --git a/error.c b/error.c
index aba99c9..43ad798 100644
--- a/error.c
+++ b/error.c
@@ -9,8 +9,9 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/st.h"
+#include "internal.h"
#include "ruby_assert.h"
#include "vm_core.h"
diff --git a/ext/-test-/string/cstr.c b/ext/-test-/string/cstr.c
index 2a41b93..71eafdb 100644
--- a/ext/-test-/string/cstr.c
+++ b/ext/-test-/string/cstr.c
@@ -1,3 +1,4 @@
+#include "ruby/encoding.h"
#include "internal.h"
static VALUE
diff --git a/file.c b/file.c
index 54d8fb1..91df3c3 100644
--- a/file.c
+++ b/file.c
@@ -24,10 +24,11 @@
#endif
#include "id.h"
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/io.h"
#include "ruby/util.h"
#include "ruby/thread.h"
+#include "internal.h"
#include "dln.h"
#include "encindex.h"
diff --git a/gc.c b/gc.c
index d0144f5..b3edd4c 100644
--- a/gc.c
+++ b/gc.c
@@ -14,6 +14,7 @@
#define rb_data_object_alloc rb_data_object_alloc
#define rb_data_typed_object_alloc rb_data_typed_object_alloc
+#include "ruby/encoding.h"
#include "ruby/io.h"
#include "ruby/st.h"
#include "ruby/re.h"
diff --git a/hash.c b/hash.c
index b4e86bd..c36b865 100644
--- a/hash.c
+++ b/hash.c
@@ -11,9 +11,10 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/st.h"
#include "ruby/util.h"
+#include "internal.h"
#include <errno.h>
#include "probes.h"
#include "id.h"
diff --git a/internal.h b/internal.h
index 1a96599..b839994 100644
--- a/internal.h
+++ b/internal.h
@@ -13,7 +13,6 @@
#define RUBY_INTERNAL_H 1
#include "ruby.h"
-#include "ruby/encoding.h"
#if defined(__cplusplus)
extern "C" {
@@ -1149,8 +1148,10 @@ void Init_ext(void);
/* encoding.c */
ID rb_id_encoding(void);
void rb_gc_mark_encodings(void);
+#ifdef RUBY_ENCODING_H
rb_encoding *rb_enc_get_from_index(int index);
rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
+#endif
int rb_encdb_replicate(const char *alias, const char *orig);
int rb_encdb_alias(const char *alias, const char *orig);
int rb_encdb_dummy(const char *name);
@@ -1169,21 +1170,23 @@ extern VALUE rb_eEAGAIN;
extern VALUE rb_eEWOULDBLOCK;
extern VALUE rb_eEINPROGRESS;
void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
-VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
VALUE rb_check_backtrace(VALUE);
NORETURN(void rb_async_bug_errno(const char *,int));
const char *rb_builtin_type_name(int t);
const char *rb_builtin_class_name(VALUE x);
PRINTF_ARGS(void rb_sys_warn(const char *fmt, ...), 1, 2);
PRINTF_ARGS(void rb_syserr_warn(int err, const char *fmt, ...), 2, 3);
+PRINTF_ARGS(void rb_sys_warning(const char *fmt, ...), 1, 2);
+PRINTF_ARGS(void rb_syserr_warning(int err, const char *fmt, ...), 2, 3);
+#ifdef RUBY_ENCODING_H
+VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
PRINTF_ARGS(void rb_sys_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
PRINTF_ARGS(void rb_syserr_enc_warn(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
-PRINTF_ARGS(void rb_sys_warning(const char *fmt, ...), 1, 2);
-PRINTF_ARGS(void rb_syserr_warning(int err, const char *fmt, ...), 2, 3);
PRINTF_ARGS(void rb_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
+#endif
#define rb_raise_cstr(etype, mesg) \
rb_exc_raise(rb_exc_new_str(etype, rb_str_new_cstr(mesg)))
@@ -1801,17 +1804,23 @@ int rb_divert_reserved_fd(int fd);
/* transcode.c */
extern VALUE rb_cEncodingConverter;
+#ifdef RUBY_ENCODING_H
size_t rb_econv_memsize(rb_econv_t *);
+#endif
/* us_ascii.c */
+#ifdef RUBY_ENCODING_H
extern rb_encoding OnigEncodingUS_ASCII;
+#endif
/* util.c */
char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
/* utf_8.c */
+#ifdef RUBY_ENCODING_H
extern rb_encoding OnigEncodingUTF_8;
+#endif
/* variable.c */
void rb_gc_mark_global_tbl(void);
@@ -1932,7 +1941,7 @@ NORETURN(void rb_unexpected_type(VALUE,int));
rb_unexpected_type((VALUE)(v), (t)) : (void)0)
/* file.c (export) */
-#ifdef HAVE_READLINK
+#if defined HAVE_READLINK && defined RUBY_ENCODING_H
VALUE rb_readlink(VALUE path, rb_encoding *enc);
#endif
#ifdef __APPLE__
diff --git a/io.c b/io.c
index eeaf0c0..fd4892f 100644
--- a/io.c
+++ b/io.c
@@ -11,9 +11,10 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/io.h"
#include "ruby/thread.h"
+#include "internal.h"
#include "dln.h"
#include "encindex.h"
#include "id.h"
diff --git a/load.c b/load.c
index e2a7a98..5034691 100644
--- a/load.c
+++ b/load.c
@@ -2,8 +2,9 @@
* load methods from eval.c
*/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/util.h"
+#include "internal.h"
#include "dln.h"
#include "eval_intern.h"
#include "probes.h"
diff --git a/localeinit.c b/localeinit.c
index dc48d42..bec29a6 100644
--- a/localeinit.c
+++ b/localeinit.c
@@ -9,6 +9,7 @@
**********************************************************************/
+#include "ruby/encoding.h"
#include "internal.h"
#include "encindex.h"
#ifdef __CYGWIN__
diff --git a/numeric.c b/numeric.c
index 918b46e..4776b24 100644
--- a/numeric.c
+++ b/numeric.c
@@ -9,8 +9,9 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/util.h"
+#include "internal.h"
#include "id.h"
#include <assert.h>
#include <ctype.h>
diff --git a/object.c b/object.c
index adec3f5..48c97b6 100644
--- a/object.c
+++ b/object.c
@@ -11,9 +11,10 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/st.h"
#include "ruby/util.h"
+#include "internal.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
diff --git a/pack.c b/pack.c
index 45b816a..3f2955e 100644
--- a/pack.c
+++ b/pack.c
@@ -9,6 +9,7 @@
**********************************************************************/
+#include "ruby/encoding.h"
#include "internal.h"
#include <sys/types.h>
#include <ctype.h>
diff --git a/re.c b/re.c
index 1ed2f94..cef7586 100644
--- a/re.c
+++ b/re.c
@@ -9,9 +9,10 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/re.h"
#include "ruby/util.h"
+#include "internal.h"
#include "regint.h"
#include "encindex.h"
#include <ctype.h>
diff --git a/ruby.c b/ruby.c
index 7e58ecb..16be70e 100644
--- a/ruby.c
+++ b/ruby.c
@@ -15,8 +15,9 @@
#include <windows.h>
#include <sys/cygwin.h>
#endif
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/thread.h"
+#include "internal.h"
#include "eval_intern.h"
#include "dln.h"
#include <stdio.h>
diff --git a/sprintf.c b/sprintf.c
index a956381..71802a4 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -11,8 +11,9 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/re.h"
+#include "internal.h"
#include "id.h"
#include <math.h>
#include <stdarg.h>
diff --git a/string.c b/string.c
index 390a9c3..582f58f 100644
--- a/string.c
+++ b/string.c
@@ -11,8 +11,9 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/re.h"
+#include "internal.h"
#include "encindex.h"
#include "probes.h"
#include "gc.h"
diff --git a/symbol.c b/symbol.c
index 147c11f..723764c 100644
--- a/symbol.c
+++ b/symbol.c
@@ -9,8 +9,9 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/st.h"
+#include "internal.h"
#include "symbol.h"
#include "gc.h"
#include "probes.h"
diff --git a/time.c b/time.c
index fca9d37..f39fb47 100644
--- a/time.c
+++ b/time.c
@@ -11,6 +11,7 @@
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
+#include "ruby/encoding.h"
#include "internal.h"
#include <sys/types.h>
#include <time.h>
diff --git a/transcode.c b/transcode.c
index 384fdd6..c524259 100644
--- a/transcode.c
+++ b/transcode.c
@@ -9,6 +9,7 @@
**********************************************************************/
+#include "ruby/encoding.h"
#include "internal.h"
#include "transcode_data.h"
#include <ctype.h>
diff --git a/variable.c b/variable.c
index b74bb7e..51891e2 100644
--- a/variable.c
+++ b/variable.c
@@ -11,9 +11,10 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/st.h"
#include "ruby/util.h"
+#include "internal.h"
#include "id_table.h"
#include "constant.h"
#include "id.h"
diff --git a/vm.c b/vm.c
index 2675c7d..8e34e45 100644
--- a/vm.c
+++ b/vm.c
@@ -14,6 +14,7 @@
#include "gc.h"
#include "vm_core.h"
+#include "vm_debug.h"
#include "iseq.h"
#include "eval_intern.h"
#include "probes.h"
diff --git a/vm_backtrace.c b/vm_backtrace.c
index d82d73d..d6a8a13 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -9,8 +9,9 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/encoding.h"
#include "ruby/debug.h"
+#include "internal.h"
#include "vm_core.h"
#include "eval_intern.h"
diff --git a/vm_core.h b/vm_core.h
index a009ca9..c2a4b1a 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -67,7 +67,6 @@
#include "ruby/st.h"
#include "node.h"
-#include "vm_debug.h"
#include "vm_opts.h"
#include "id.h"
#include "method.h"