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

ruby-changes:42065

From: nobu <ko1@a...>
Date: Thu, 17 Mar 2016 11:36:34 +0900 (JST)
Subject: [ruby-changes:42065] nobu:r54139 (trunk): socket/option.c: accurate condition

nobu	2016-03-17 11:36:28 +0900 (Thu, 17 Mar 2016)

  New Revision: 54139

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54139

  Log:
    socket/option.c: accurate condition
    
    * ext/socket/option.c (inspect_tcpi_msec): more accurate condition
      for TCPI msec member inspection function.
      [ruby-core:74388] [Bug #12185]

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/option.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54138)
+++ ChangeLog	(revision 54139)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Mar 17 11:36:27 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/socket/option.c (inspect_tcpi_msec): more accurate condition
+	  for TCPI msec member inspection function.
+	  [ruby-core:74388] [Bug #12185]
+
 Thu Mar 17 08:13:43 2016  Rei Odaira  <Rei.Odaira@g...>
 
 	* test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff values
Index: ext/socket/option.c
===================================================================
--- ext/socket/option.c	(revision 54138)
+++ ext/socket/option.c	(revision 54139)
@@ -930,7 +930,12 @@ inspect_tcpi_usec(VALUE ret, const char https://github.com/ruby/ruby/blob/trunk/ext/socket/option.c#L930
     rb_str_catf(ret, "%s%u.%06us", prefix, t / 1000000, t % 1000000);
 }
 
-#if defined(__linux__) || defined(__sun)
+#if !defined __FreeBSD__ && ( \
+    defined HAVE_STRUCT_TCP_INFO_TCPI_LAST_DATA_SENT || \
+    defined HAVE_STRUCT_TCP_INFO_TCPI_LAST_DATA_RECV || \
+    defined HAVE_STRUCT_TCP_INFO_TCPI_LAST_ACK_SENT  || \
+    defined HAVE_STRUCT_TCP_INFO_TCPI_LAST_ACK_RECV  || \
+    0)
 static void
 inspect_tcpi_msec(VALUE ret, const char *prefix, uint32_t t)
 {

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

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