ruby-changes:19006
From: nobu <ko1@a...>
Date: Mon, 7 Mar 2011 09:21:46 +0900 (JST)
Subject: [ruby-changes:19006] Ruby:r31042 (trunk): * process.c: NUM2RLIM is defined but no getrlimit and setrlimit on
nobu 2011-03-07 09:06:08 +0900 (Mon, 07 Mar 2011) New Revision: 31042 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31042 Log: * process.c: NUM2RLIM is defined but no getrlimit and setrlimit on mingw. Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31041) +++ ChangeLog (revision 31042) @@ -1,3 +1,8 @@ +Mon Mar 7 09:05:18 2011 Nobuyoshi Nakada <nobu@r...> + + * process.c: NUM2RLIM is defined but no getrlimit and setrlimit on + mingw. + Mon Mar 7 08:38:14 2011 Nobuyoshi Nakada <nobu@r...> * ext/date/date_core.c (DateTimeData): should not use bare 'long long' Index: process.c =================================================================== --- process.c (revision 31041) +++ process.c (revision 31042) @@ -1427,7 +1427,7 @@ } } -#ifdef RLIM2NUM +#if defined(HAVE_SETRLIMIT) && defined(NUM2RLIM) static int rlimit_type_by_lname(const char *name); #endif @@ -1465,7 +1465,7 @@ } else #endif -#ifdef RLIM2NUM +#if defined(HAVE_SETRLIMIT) && defined(NUM2RLIM) if (strncmp("rlimit_", rb_id2name(id), 7) == 0 && (rtype = rlimit_type_by_lname(rb_id2name(id)+7)) != -1) { VALUE ary = rb_ary_entry(options, EXEC_OPTION_RLIMIT); @@ -2222,7 +2222,7 @@ } #endif -#ifdef RLIM2NUM +#if defined(HAVE_SETRLIMIT) && defined(RLIM2NUM) static int run_exec_rlimit(VALUE ary, VALUE save, char *errmsg, size_t errmsg_buflen) { @@ -2284,7 +2284,7 @@ } #endif -#ifdef RLIM2NUM +#if defined(HAVE_SETRLIMIT) && defined(RLIM2NUM) obj = rb_ary_entry(options, EXEC_OPTION_RLIMIT); if (!NIL_P(obj)) { if (run_exec_rlimit(obj, soptions, errmsg, errmsg_buflen) == -1) @@ -3626,7 +3626,7 @@ #define proc_setpriority rb_f_notimplement #endif -#if defined(RLIM2NUM) +#if defined(HAVE_SETRLIMIT) && defined(NUM2RLIM) static int rlimit_resource_name2int(const char *name, int casetype) { @@ -5690,7 +5690,7 @@ rb_define_module_function(rb_mProcess, "getrlimit", proc_getrlimit, 1); rb_define_module_function(rb_mProcess, "setrlimit", proc_setrlimit, -1); -#ifdef RLIM2NUM +#if defined(RLIM2NUM) && defined(RLIM_INFINITY) { VALUE inf = RLIM2NUM(RLIM_INFINITY); #ifdef RLIM_SAVED_MAX -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/