[前][次][番号順一覧][スレッド一覧]

ruby-changes:30562

From: akr <ko1@a...>
Date: Wed, 21 Aug 2013 19:32:07 +0900 (JST)
Subject: [ruby-changes:30562] akr:r42641 (trunk): * process.c: POSIX_GETTIMEOFDAY_CLOCK_REALTIME is renamed to

akr	2013-08-21 19:31:59 +0900 (Wed, 21 Aug 2013)

  New Revision: 42641

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42641

  Log:
    * process.c: POSIX_GETTIMEOFDAY_CLOCK_REALTIME is renamed to
      SUS_GETTIMEOFDAY_CLOCK_REALTIME.

  Modified files:
    trunk/ChangeLog
    trunk/process.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42640)
+++ ChangeLog	(revision 42641)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Aug 21 19:31:48 2013  Tanaka Akira  <akr@f...>
+
+	* process.c: POSIX_GETTIMEOFDAY_CLOCK_REALTIME is renamed to
+	  SUS_GETTIMEOFDAY_CLOCK_REALTIME.
+
 Wed Aug 21 19:17:46 2013  Tanaka Akira  <akr@f...>
 
 	* process.c (rb_clock_gettime): CLOCK_PROCESS_CPUTIME_ID emulation
Index: process.c
===================================================================
--- process.c	(revision 42640)
+++ process.c	(revision 42641)
@@ -6685,10 +6685,10 @@ rb_proc_times(VALUE obj) https://github.com/ruby/ruby/blob/trunk/process.c#L6685
  *  There are emulations for clock_gettime().
  *
  *  For example, Process::CLOCK_REALTIME is defined as
- *  +:POSIX_GETTIMEOFDAY_CLOCK_REALTIME+ when clock_gettime() is not available.
+ *  +:SUS_GETTIMEOFDAY_CLOCK_REALTIME+ when clock_gettime() is not available.
  *
  *  Emulations for +CLOCK_REALTIME+:
- *  [:POSIX_GETTIMEOFDAY_CLOCK_REALTIME] Use gettimeofday().  The resolution is 1 micro second.
+ *  [:SUS_GETTIMEOFDAY_CLOCK_REALTIME] Use gettimeofday().  The resolution is 1 micro second.
  *  [:ISO_C_TIME_CLOCK_REALTIME] Use time().  The resolution is 1 second.
  *
  *  Emulations for +CLOCK_MONOTONIC+:
@@ -6746,11 +6746,11 @@ rb_clock_gettime(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/process.c#L6746
          * Non-clock_gettime clocks are provided by symbol clk_id.
          *
          * gettimeofday is always available on platforms supported by Ruby.
-         * POSIX_GETTIMEOFDAY_CLOCK_REALTIME is used for
+         * SUS_GETTIMEOFDAY_CLOCK_REALTIME is used for
          * CLOCK_REALTIME if clock_gettime is not available.
          */
-#define RUBY_POSIX_GETTIMEOFDAY_CLOCK_REALTIME ID2SYM(rb_intern("POSIX_GETTIMEOFDAY_CLOCK_REALTIME"))
-        if (clk_id == RUBY_POSIX_GETTIMEOFDAY_CLOCK_REALTIME) {
+#define RUBY_SUS_GETTIMEOFDAY_CLOCK_REALTIME ID2SYM(rb_intern("SUS_GETTIMEOFDAY_CLOCK_REALTIME"))
+        if (clk_id == RUBY_SUS_GETTIMEOFDAY_CLOCK_REALTIME) {
             struct timeval tv;
             ret = gettimeofday(&tv, 0);
             if (ret != 0)
@@ -7126,8 +7126,8 @@ Init_process(void) https://github.com/ruby/ruby/blob/trunk/process.c#L7126
 
 #ifdef CLOCK_REALTIME
     rb_define_const(rb_mProcess, "CLOCK_REALTIME", CLOCKID2NUM(CLOCK_REALTIME));
-#elif defined(RUBY_POSIX_GETTIMEOFDAY_CLOCK_REALTIME)
-    rb_define_const(rb_mProcess, "CLOCK_REALTIME", RUBY_POSIX_GETTIMEOFDAY_CLOCK_REALTIME);
+#elif defined(RUBY_SUS_GETTIMEOFDAY_CLOCK_REALTIME)
+    rb_define_const(rb_mProcess, "CLOCK_REALTIME", RUBY_SUS_GETTIMEOFDAY_CLOCK_REALTIME);
 #endif
 #ifdef CLOCK_MONOTONIC
     rb_define_const(rb_mProcess, "CLOCK_MONOTONIC", CLOCKID2NUM(CLOCK_MONOTONIC));

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]