diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-12 14:03:12 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-12 14:03:12 +0000 |
| commit | 2019f1c0b5eb159cdbe99956a4a47cf30ab4da8c (patch) | |
| tree | 9697bb427599aeefb20733d77ab3d5f9c66b8cb7 | |
| parent | 73469460910239659f7a2abdbdec409bfefe12a5 (diff) | |
merges r22898 from trunk into ruby_1_9_1.
--
* thread_pthread.c (ruby_init_stack): range of rlim_cur may be
larger than int.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | thread_pthread.c | 4 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,11 @@ +Thu Mar 12 05:12:53 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * thread_pthread.c (ruby_init_stack): range of rlim_cur may be + larger than int. + + * missing/vsnprintf.c (BSD_vfprintf): commented out code which has + no effect at all. + Wed Mar 11 20:13:38 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/dl/handle.c (rb_dlhandle_sym): RTLD_NEXT is not for symbol diff --git a/thread_pthread.c b/thread_pthread.c index 21c54bb70..e5ae3c156 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -292,10 +292,10 @@ ruby_init_stack(VALUE *addr struct rlimit rlim; if (getrlimit(RLIMIT_STACK, &rlim) == 0) { - unsigned int space = rlim.rlim_cur/5; + size_t space = (size_t)(rlim.rlim_cur/5); if (space > 1024*1024) space = 1024*1024; - native_main_thread.stack_maxsize = rlim.rlim_cur - space; + native_main_thread.stack_maxsize = (size_t)rlim.rlim_cur - space; } } #endif |
