ruby-changes:49770
From: nobu <ko1@a...>
Date: Wed, 17 Jan 2018 20:22:19 +0900 (JST)
Subject: [ruby-changes:49770] nobu:r61888 (trunk): process.c: get_clk_tck fallback
nobu 2018-01-17 20:22:14 +0900 (Wed, 17 Jan 2018) New Revision: 61888 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61888 Log: process.c: get_clk_tck fallback * process.c (get_clk_tck): prefer CLK_TCK over older HZ, next to _SC_CLK_TCK. Modified files: trunk/process.c Index: process.c =================================================================== --- process.c (revision 61887) +++ process.c (revision 61888) @@ -6882,20 +6882,15 @@ p_gid_switch(VALUE obj) https://github.com/ruby/ruby/blob/trunk/process.c#L6882 static long get_clk_tck(void) { - long hertz = #ifdef HAVE__SC_CLK_TCK - sysconf(_SC_CLK_TCK); + return sysconf(_SC_CLK_TCK); +#elif defined CLK_TCK + return CLK_TCK; +#elif defined HZ + return HZ; #else -#ifndef HZ -# ifdef CLK_TCK -# define HZ CLK_TCK -# else -# define HZ 60 -# endif -#endif /* HZ */ - HZ; + return 60; #endif - return hertz; } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/