From 6f84d49552fa56a2451d4ee500912475494641ef Mon Sep 17 00:00:00 2001 From: knu Date: Mon, 19 May 2008 05:44:47 +0000 Subject: Merge from ruby_1_8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 16 ++++++++++++++++ Makefile.in | 3 --- bcc32/Makefile.sub | 32 ++++++++++++++++++++++++++++++++ common.mk | 4 ++++ process.c | 3 +++ sprintf.c | 2 ++ win32/Makefile.sub | 26 ++++++++++++++++---------- 7 files changed, 73 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53fa23106f..4806ec905a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Mon May 19 14:20:13 2008 NAKAMURA Usaku + + * sprintf.c (rb_f_sprintf): fixed SEGV on win32 with "% 0e" % 1.0/0.0. + +Mon May 19 13:29:58 2008 NAKAMURA Usaku + + * process.c (rb_f_system): set last_status when status == -1 because + there is no path to set it on win32. this patch is derived from + [ruby-core:16787], submitted by Luis Lavena + +Mon May 19 13:01:05 2008 Nobuyoshi Nakada + + * common.mk ({MSPEC,RUBYSPEC}_GIT_URL): moved from Makefine.in. + + * {win32,bcc32}/Makefile.sub (update-rubyspec): added. + Mon May 19 11:53:45 2008 Akinori MUSHA * ext/openssl/openssl_missing.c (HMAC_CTX_copy): adopted diff --git a/Makefile.in b/Makefile.in index e21785deca..18537a53ad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -182,9 +182,6 @@ distclean-local:: ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ -c ext/extinit.c -MSPEC_GIT_URL=git://github.com/brixen/mspec.git -RUBYSPEC_GIT_URL=git://github.com/brixen/rubyspec.git - update-rubyspec: if [ -d $(srcdir)/rubyspec ]; then \ cd $(srcdir)/rubyspec/mspec; \ diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index 67dbdb0ede..98e0b3da23 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -471,6 +471,38 @@ distclean-local:: @$(RM) ext\config.cache $(RBCONFIG:/=\) @$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc +update-rubyspec: + @echo SPEC_EXISTS=0 > $@.mk + @if exist $(srcdir:/=\)\rubyspec\nul echo SPEC_EXISTS=1 >> $@.mk + @type >> $@.mk &&| +$()update-rubyspec: +$() @del $@.mk +$()!if $$(SPEC_EXISTS) +$() cd $(srcdir:/=\)\rubyspec\mspec +$() git pull +$() cd ..\spec\rubyspec +$() git pull +$()!else +$() git clone $(MSPEC_GIT_URL) $(srcdir)/rubyspec/mspec +$() git clone $(RUBYSPEC_GIT_URL) $(srcdir)/rubyspec/spec/rubyspec +$()!endif +| + @$(MAKE) -$(MAKEFLAGS)$(MFLAGS) -f $@.mk + +test-rubyspec: + @echo SPEC_EXISTS=0 > $@.mk + @if exist $(srcdir:/=\)\rubyspec\nul echo SPEC_EXISTS=1 >> $@.mk + @type >> $@.mk &&| +$()test-rubyspec: +$()!if $$(SPEC_EXISTS) +$() $(RUNRUBY) $(srcdir)/rubyspec/mspec/bin/mspec -r$(srcdir)/ext/purelib.rb $(srcdir)/rubyspec/spec/rubyspec/$(MAJOR).$(MINOR) +$()!else +$() @echo No rubyspec here. put rubyspec to srcdir first. +$() @cd $(srcdir:/=\)\rubyspec +$()!endif +| + @$(MAKE) -$(MAKEFLAGS) -f $@.mk + ext/extinit.obj: ext/extinit.c $(SETUP) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -o$@ -c ext/extinit.c diff --git a/common.mk b/common.mk index ccf853d432..a026554036 100644 --- a/common.mk +++ b/common.mk @@ -5,6 +5,10 @@ dll: $(LIBRUBY_SO) RUBYLIB = - RUBYOPT = - +SPEC_GIT_BASE = git://github.com/brixen +MSPEC_GIT_URL = $(SPEC_GIT_BASE)/mspec.git +RUBYSPEC_GIT_URL = $(SPEC_GIT_BASE)/rubyspec.git + STATIC_RUBY = static-ruby EXTCONF = extconf.rb diff --git a/process.c b/process.c index 864c8168c0..fa45829196 100644 --- a/process.c +++ b/process.c @@ -1519,6 +1519,9 @@ rb_f_system(argc, argv) } #if !defined(_WIN32) last_status_set(status == -1 ? 127 : status, 0); +#else + if (status == -1) + last_status_set(0x7f << 8, 0); #endif #elif defined(__VMS) VALUE cmd; diff --git a/sprintf.c b/sprintf.c index c5334b1f9f..cf8ea20de6 100644 --- a/sprintf.c +++ b/sprintf.c @@ -729,6 +729,8 @@ rb_f_sprintf(argc, argv) need = strlen(expr); if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS)) need++; + else if (flags & FSPACE) + need++; if ((flags & FWIDTH) && need < width) need = width; diff --git a/win32/Makefile.sub b/win32/Makefile.sub index ab83ace2c5..85b58ac586 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -233,14 +233,6 @@ ASMEXT = asm INSTALLED_LIST= .installed.list -!if [find "revision.h" $(srcdir:/=\)\version.h > nul 2> nul] == 0 -REVISION_H = revision.h -REVISION_UP = revision-up -!else -REVISION_H = version.h -REVISION_UP = -!endif - !if !defined(WINMAINOBJ) WINMAINOBJ = winmain.$(OBJEXT) !endif @@ -639,10 +631,24 @@ class File end <