diff --git a/ChangeLog b/ChangeLog index bb8a2145e9..572bf63591 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Tue Jan 15 01:19:00 2008 Nobuyoshi Nakada + + * common.mk (OBJS): moved encoding.o from COMMONOBJS. + + * common.mk (dmyencoding.o): added. [ruby-dev:33099] + + * configure.in, {win,bcc}32/Makefile.sub (MINIOBJS): added + dmyencoding.o. + + * dmyencoding.c (rb_locale_charmap): returns nil for miniruby. + Tue Jan 15 00:05:50 2008 Yukihiro Matsumoto * io.c (appendline): specifying limit should not generate broken diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index 94e5478af3..56fe2372ad 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -200,7 +200,7 @@ ASMEXT = asm INSTALLED_LIST= .installed.list WINMAINOBJ = winmain.$(OBJEXT) -MINIOBJS = dmydln.$(OBJEXT) miniprelude.$(OBJEXT) +MINIOBJS = dmydln.$(OBJEXT) dmyencoding.$(OBJEXT) miniprelude.$(OBJEXT) arch_hdrdir = $(EXTOUT)/include/$(arch) hdrdir = $(srcdir)/include diff --git a/common.mk b/common.mk index 9879c47b42..9392d684f9 100644 --- a/common.mk +++ b/common.mk @@ -24,7 +24,6 @@ COMMONOBJS = array.$(OBJEXT) \ class.$(OBJEXT) \ compar.$(OBJEXT) \ dir.$(OBJEXT) \ - encoding.$(OBJEXT) \ enum.$(OBJEXT) \ enumerator.$(OBJEXT) \ error.$(OBJEXT) \ @@ -77,6 +76,7 @@ COMMONOBJS = array.$(OBJEXT) \ $(MISSING) OBJS = dln.$(OBJEXT) \ + encoding.$(OBJEXT) \ prelude.$(OBJEXT) \ $(COMMONOBJS) @@ -428,6 +428,10 @@ dmydln.$(OBJEXT): {$(VPATH)}dmydln.c {$(VPATH)}dln.c {$(VPATH)}ruby.h \ {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}dln.h dmyext.$(OBJEXT): {$(VPATH)}dmyext.c +dmyencoding.$(OBJEXT): {$(VPATH)}dmyencoding.c {$(VPATH)}encoding.c {$(VPATH)}ruby.h \ + {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ + {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}encoding.h \ + {$(VPATH)}oniguruma.h {$(VPATH)}regenc.h {$(VPATH)}encdb.h encoding.$(OBJEXT): {$(VPATH)}encoding.c {$(VPATH)}ruby.h \ {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ {$(VPATH)}intern.h {$(VPATH)}st.h {$(VPATH)}encoding.h \ diff --git a/configure.in b/configure.in index e32e8e0bab..43d5b84293 100644 --- a/configure.in +++ b/configure.in @@ -1608,7 +1608,7 @@ case "$target_os" in *) ;; esac -MINIOBJS="$MINIDLNOBJ" +MINIOBJS="$MINIDLNOBJ dmyencoding.o" case "$build_os" in *msdosdjgpp*) FIRSTMAKEFILE=GNUmakefile:djgpp/GNUmakefile.in;; diff --git a/dmyencoding.c b/dmyencoding.c new file mode 100644 index 0000000000..1bd1106e69 --- /dev/null +++ b/dmyencoding.c @@ -0,0 +1,2 @@ +#define NO_LOCALE_CHARMAP 1 +#include "encoding.c" diff --git a/encoding.c b/encoding.c index 4e3a02f173..46853964e1 100644 --- a/encoding.c +++ b/encoding.c @@ -943,7 +943,9 @@ rb_enc_set_default_external(VALUE encoding) VALUE rb_locale_charmap(VALUE klass) { -#ifdef HAVE_LANGINFO_H +#if defined NO_LOCALE_CHARMAP + return Qnil; +#elif defined HAVE_LANGINFO_H char *codeset; codeset = nl_langinfo(CODESET); return rb_str_new2(codeset); diff --git a/win32/Makefile.sub b/win32/Makefile.sub index adcde7424a..d0d8a3fc67 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -257,7 +257,7 @@ REVISION_UP = !if !defined(WINMAINOBJ) WINMAINOBJ = winmain.$(OBJEXT) !endif -MINIOBJS = dmydln.$(OBJEXT) miniprelude.$(OBJEXT) +MINIOBJS = dmydln.$(OBJEXT) dmyencoding.$(OBJEXT) miniprelude.$(OBJEXT) LIBOBJS = acosh.obj crypt.obj erf.obj strlcpy.obj strlcat.obj win32.obj $(LIBOBJS) !ifndef COMMON_LIBS