diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-06 08:16:45 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-06 08:16:45 +0000 |
commit | fadc3a8bbc83b541a7b345a757e06cfe3585b8e4 (patch) | |
tree | 6f886f19f2de4ac08431aacb4327308f3edf02df | |
parent | 4bada8b864e445b6eebe1a341e30cad94dbcaf84 (diff) | |
download | ruby-fadc3a8bbc83b541a7b345a757e06cfe3585b8e4.tar.gz |
* time.c (rb_localtime_r2): get rid of infinite loop bug of
localtime() on x86_64-darwin. [ruby-core:30031]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | time.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Thu May 6 17:16:42 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * time.c (rb_localtime_r2): get rid of infinite loop bug of + localtime() on x86_64-darwin. [ruby-core:30031] + Thu May 6 15:56:12 2010 Aaron Patterson <aaron@tenderlovemaking.com> * ext/fiddle/*: Adding fiddle library to wrap libffi @@ -863,6 +863,9 @@ rb_localtime_r(const time_t *tp, struct tm *result) static struct tm * rb_localtime_r2(const time_t *t, struct tm *result) { +#if defined __APPLE__ && defined __LP64__ + if (*t != (time_t)(int)*t) return NULL; +#endif result = rb_localtime_r(t, result); #if defined(HAVE_MKTIME) && defined(LOCALTIME_OVERFLOW_PROBLEM) if (result) { |