ruby-changes:4620
From: ko1@a...
Date: Mon, 21 Apr 2008 10:02:03 +0900 (JST)
Subject: [ruby-changes:4620] usa - Ruby:r16114 (ruby_1_8): * time.c (rb_strftime): check errno to detect strftime(3)'s error.
usa 2008-04-21 10:01:50 +0900 (Mon, 21 Apr 2008) New Revision: 16114 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/time.c branches/ruby_1_8/version.h Log: * time.c (rb_strftime): check errno to detect strftime(3)'s error. this is workaround for recent version of MSVCRT. [ruby-dev:34456] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=16114&r2=16113&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/time.c?r1=16114&r2=16113&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/version.h?r1=16114&r2=16113&diff_format=u Index: ruby_1_8/time.c =================================================================== --- ruby_1_8/time.c (revision 16113) +++ ruby_1_8/time.c (revision 16114) @@ -1776,8 +1776,9 @@ if (flen == 0) { return 0; } + errno = 0; len = strftime(*buf, SMALLBUF, format, time); - if (len != 0 || **buf == '\0') return len; + if (len != 0 || (**buf == '\0' && errno != ERANGE)) return len; for (size=1024; ; size*=2) { *buf = xmalloc(size); (*buf)[0] = '\0'; Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 16113) +++ ruby_1_8/ChangeLog (revision 16114) @@ -1,3 +1,9 @@ +Mon Apr 21 10:00:51 2008 NAKAMURA Usaku <usa@r...> + + * time.c (rb_strftime): check errno to detect strftime(3)'s error. + this is workaround for recent version of MSVCRT. + [ruby-dev:34456] + Sun Apr 20 21:02:06 2008 Akinori MUSHA <knu@i...> * enumerator.c: Resolve the method every time an enumeration Index: ruby_1_8/version.h =================================================================== --- ruby_1_8/version.h (revision 16113) +++ ruby_1_8/version.h (revision 16114) @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.7" -#define RUBY_RELEASE_DATE "2008-04-20" +#define RUBY_RELEASE_DATE "2008-04-21" #define RUBY_VERSION_CODE 187 -#define RUBY_RELEASE_CODE 20080420 +#define RUBY_RELEASE_CODE 20080421 #define RUBY_PATCHLEVEL 5000 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 20 +#define RUBY_RELEASE_DAY 21 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/