diff --git a/ChangeLog b/ChangeLog index 5fad0c9e87..a402f2e553 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 8 22:33:03 2008 NARUSE, Yui + + * encoding.c, Makefile.in, include/ruby/oniguruma.h, + enc/Makefile.in: fix rules for UTF-{16,32}{BE,LE}. + Tue Jan 8 20:02:08 2008 Nobuyoshi Nakada * win{32,ce}/Makefile.sub: merged. diff --git a/Makefile.in b/Makefile.in index 8459cc2780..ccc175ce1f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -148,7 +148,7 @@ fake.rb: Makefile end; \ ' > $@ -Makefile: $(srcdir)/Makefile.in +Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in $(MKFILES): config.status $(srcdir)/common.mk MAKE=$(MAKE) $(SHELL) ./config.status @@ -160,7 +160,7 @@ $(MKFILES): config.status $(srcdir)/common.mk $(MAKE) -f conftest.mk | grep '^AUTO_REMAKE$$' >/dev/null 2>&1 || \ { echo "Makefile updated, restart."; exit 1; } -config.status: $(srcdir)/configure +config.status: $(srcdir)/configure $(srcdir)/enc/Makefile.in MINIRUBY="$(MINIRUBY)" $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in diff --git a/enc/Makefile.in b/enc/Makefile.in index 082be84c86..234a7e89c5 100644 --- a/enc/Makefile.in +++ b/enc/Makefile.in @@ -16,7 +16,8 @@ OBJEXT = @OBJEXT@ BUILTIN_ENCS = ascii.c \ euc_jp.c sjis.c \ - unicode.c utf8.c + unicode.c utf8.c \ + utf_16be.c utf_16le.c utf_32be.c utf_32le.c RUBY_SO_NAME = @RUBY_SO_NAME@ LIBRUBY = @LIBRUBY@ diff --git a/encoding.c b/encoding.c index fc7fa37e24..a46e133acf 100644 --- a/encoding.c +++ b/encoding.c @@ -295,6 +295,10 @@ enum { ENCINDEX_EUC_JP, ENCINDEX_SJIS, ENCINDEX_UTF8, + ENCINDEX_UTF_16BE, + ENCINDEX_UTF_16LE, + ENCINDEX_UTF_32BE, + ENCINDEX_UTF_32LE, ENCINDEX_BUILTIN_MAX }; @@ -307,6 +311,10 @@ rb_enc_init(void) ENC_REGISTER(EUC_JP); ENC_REGISTER(SJIS); ENC_REGISTER(UTF8); + ENC_REGISTER(UTF_16BE); + ENC_REGISTER(UTF_16LE); + ENC_REGISTER(UTF_32BE); + ENC_REGISTER(UTF_32LE); #undef ENC_REGISTER enc_alias("ASCII", rb_enc_name(ONIG_ENCODING_ASCII)); enc_alias("BINARY", rb_enc_name(ONIG_ENCODING_ASCII)); diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h index 7b11b51780..f183951a27 100644 --- a/include/ruby/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -189,10 +189,10 @@ ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_14; ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_15; ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_16; ONIG_EXTERN OnigEncodingType OnigEncodingUTF8; -ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_BE; -ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_LE; -ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_BE; -ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_LE; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF_16BE; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF_16LE; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF_32BE; +ONIG_EXTERN OnigEncodingType OnigEncodingUTF_32LE; ONIG_EXTERN OnigEncodingType OnigEncodingEUC_JP; ONIG_EXTERN OnigEncodingType OnigEncodingEUC_TW; ONIG_EXTERN OnigEncodingType OnigEncodingEUC_KR; @@ -221,10 +221,10 @@ ONIG_EXTERN OnigEncodingType OnigEncodingGB18030; #define ONIG_ENCODING_ISO_8859_15 (&OnigEncodingISO_8859_15) #define ONIG_ENCODING_ISO_8859_16 (&OnigEncodingISO_8859_16) #define ONIG_ENCODING_UTF8 (&OnigEncodingUTF8) -#define ONIG_ENCODING_UTF16_BE (&OnigEncodingUTF16_BE) -#define ONIG_ENCODING_UTF16_LE (&OnigEncodingUTF16_LE) -#define ONIG_ENCODING_UTF32_BE (&OnigEncodingUTF32_BE) -#define ONIG_ENCODING_UTF32_LE (&OnigEncodingUTF32_LE) +#define ONIG_ENCODING_UTF_16BE (&OnigEncodingUTF_16BE) +#define ONIG_ENCODING_UTF_16LE (&OnigEncodingUTF_16LE) +#define ONIG_ENCODING_UTF_32BE (&OnigEncodingUTF_32BE) +#define ONIG_ENCODING_UTF_32LE (&OnigEncodingUTF_32LE) #define ONIG_ENCODING_EUC_JP (&OnigEncodingEUC_JP) #define ONIG_ENCODING_EUC_TW (&OnigEncodingEUC_TW) #define ONIG_ENCODING_EUC_KR (&OnigEncodingEUC_KR)