* process.c (NUM2RLIM, RLIM2NUM): Without SIZEOF_RLIM_T is not error.

fixed: [ruby-dev:25346]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2004-12-27 05:39:27 +00:00
Родитель 85cd4d9c5d
Коммит 13388ff264
2 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Mon Dec 27 14:36:20 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* process.c (NUM2RLIM, RLIM2NUM): Without SIZEOF_RLIM_T is not error.
fixed: [ruby-dev:25346]
Sun Dec 26 16:21:39 2004 Shugo Maeda <shugo@ruby-lang.org> Sun Dec 26 16:21:39 2004 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/imap.rb (Net::IMAP::PlainAuthenticator): added a new class * lib/net/imap.rb (Net::IMAP::PlainAuthenticator): added a new class

Просмотреть файл

@ -1952,8 +1952,6 @@ proc_setpriority(obj, which, who, prio)
#elif SIZEOF_RLIM_T == SIZEOF_LONG_LONG #elif SIZEOF_RLIM_T == SIZEOF_LONG_LONG
# define RLIM2NUM(v) ULL2NUM(v) # define RLIM2NUM(v) ULL2NUM(v)
# define NUM2RLIM(v) NUM2ULL(v) # define NUM2RLIM(v) NUM2ULL(v)
#else
# error cannot find an integer type which size is same as rlim_t.
#endif #endif
/* /*
@ -1978,7 +1976,7 @@ proc_setpriority(obj, which, who, prio)
static VALUE static VALUE
proc_getrlimit(VALUE obj, VALUE resource) proc_getrlimit(VALUE obj, VALUE resource)
{ {
#ifdef HAVE_GETRLIMIT #if defined(HAVE_GETRLIMIT) && defined(RLIM2NUM)
struct rlimit rlim; struct rlimit rlim;
rb_secure(2); rb_secure(2);
@ -2025,7 +2023,7 @@ proc_getrlimit(VALUE obj, VALUE resource)
static VALUE static VALUE
proc_setrlimit(VALUE obj, VALUE resource, VALUE rlim_cur, VALUE rlim_max) proc_setrlimit(VALUE obj, VALUE resource, VALUE rlim_cur, VALUE rlim_max)
{ {
#ifdef HAVE_SETRLIMIT #if defined(HAVE_SETRLIMIT) && defined(NUM2RLIM)
struct rlimit rlim; struct rlimit rlim;
rb_secure(2); rb_secure(2);
@ -3728,7 +3726,7 @@ Init_process()
#ifdef HAVE_SETRLIMIT #ifdef HAVE_SETRLIMIT
rb_define_module_function(rb_mProcess, "setrlimit", proc_setrlimit, 3); rb_define_module_function(rb_mProcess, "setrlimit", proc_setrlimit, 3);
#endif #endif
#ifdef HAVE_RLIM_T #ifdef RLIM2NUM
#ifdef RLIM_INFINITY #ifdef RLIM_INFINITY
rb_define_const(rb_mProcess, "RLIM_INFINITY", RLIM2NUM(RLIM_INFINITY)); rb_define_const(rb_mProcess, "RLIM_INFINITY", RLIM2NUM(RLIM_INFINITY));
#endif #endif