ruby-changes:33943
From: akr <ko1@a...>
Date: Tue, 20 May 2014 05:00:22 +0900 (JST)
Subject: [ruby-changes:33943] akr:r46024 (trunk): * ext/socket/extconf.rb: Don't check fields of struct tcp_info if the
akr 2014-05-20 05:00:00 +0900 (Tue, 20 May 2014) New Revision: 46024 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46024 Log: * ext/socket/extconf.rb: Don't check fields of struct tcp_info if the structure is not available. Modified files: trunk/ChangeLog trunk/ext/socket/extconf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 46023) +++ ChangeLog (revision 46024) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue May 20 04:58:54 2014 Tanaka Akira <akr@f...> + + * ext/socket/extconf.rb: Don't check fields of struct tcp_info if the + structure is not available. + Mon May 19 23:13:33 2014 Tanaka Akira <akr@f...> * ext/socket/option.c (inspect_tcp_info): Permit longer data. (glibc Index: ext/socket/extconf.rb =================================================================== --- ext/socket/extconf.rb (revision 46023) +++ ext/socket/extconf.rb (revision 46024) @@ -371,60 +371,61 @@ have_msg_control = nil https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L371 have_msg_control = have_struct_member('struct msghdr', 'msg_control', headers) unless $mswin or $mingw have_struct_member('struct msghdr', 'msg_accrights', headers) -have_type("struct tcp_info", headers) -have_const("TCP_ESTABLISHED", headers) -have_const("TCP_SYN_SENT", headers) -have_const("TCP_SYN_RECV", headers) -have_const("TCP_FIN_WAIT1", headers) -have_const("TCP_FIN_WAIT2", headers) -have_const("TCP_TIME_WAIT", headers) -have_const("TCP_CLOSE", headers) -have_const("TCP_CLOSE_WAIT", headers) -have_const("TCP_LAST_ACK", headers) -have_const("TCP_LISTEN", headers) -have_const("TCP_CLOSING", headers) -have_struct_member('struct tcp_info', 'tcpi_state', headers) -have_struct_member('struct tcp_info', 'tcpi_ca_state', headers) -have_struct_member('struct tcp_info', 'tcpi_retransmits', headers) -have_struct_member('struct tcp_info', 'tcpi_probes', headers) -have_struct_member('struct tcp_info', 'tcpi_backoff', headers) -have_struct_member('struct tcp_info', 'tcpi_options', headers) -have_struct_member('struct tcp_info', 'tcpi_snd_wscale', headers) -have_struct_member('struct tcp_info', 'tcpi_rcv_wscale', headers) -have_struct_member('struct tcp_info', 'tcpi_rto', headers) -have_struct_member('struct tcp_info', 'tcpi_ato', headers) -have_struct_member('struct tcp_info', 'tcpi_snd_mss', headers) -have_struct_member('struct tcp_info', 'tcpi_rcv_mss', headers) -have_struct_member('struct tcp_info', 'tcpi_unacked', headers) -have_struct_member('struct tcp_info', 'tcpi_sacked', headers) -have_struct_member('struct tcp_info', 'tcpi_lost', headers) -have_struct_member('struct tcp_info', 'tcpi_retrans', headers) -have_struct_member('struct tcp_info', 'tcpi_fackets', headers) -have_struct_member('struct tcp_info', 'tcpi_last_data_sent', headers) -have_struct_member('struct tcp_info', 'tcpi_last_ack_sent', headers) -have_struct_member('struct tcp_info', 'tcpi_last_data_recv', headers) -have_struct_member('struct tcp_info', 'tcpi_last_ack_recv', headers) -have_struct_member('struct tcp_info', 'tcpi_pmtu', headers) -have_struct_member('struct tcp_info', 'tcpi_rcv_ssthresh', headers) -have_struct_member('struct tcp_info', 'tcpi_rtt', headers) -have_struct_member('struct tcp_info', 'tcpi_rttvar', headers) -have_struct_member('struct tcp_info', 'tcpi_snd_ssthresh', headers) -have_struct_member('struct tcp_info', 'tcpi_snd_cwnd', headers) -have_struct_member('struct tcp_info', 'tcpi_advmss', headers) -have_struct_member('struct tcp_info', 'tcpi_reordering', headers) -have_struct_member('struct tcp_info', 'tcpi_rcv_rtt', headers) -have_struct_member('struct tcp_info', 'tcpi_rcv_space', headers) -have_struct_member('struct tcp_info', 'tcpi_total_retrans', headers) +if have_type("struct tcp_info", headers) + have_const("TCP_ESTABLISHED", headers) + have_const("TCP_SYN_SENT", headers) + have_const("TCP_SYN_RECV", headers) + have_const("TCP_FIN_WAIT1", headers) + have_const("TCP_FIN_WAIT2", headers) + have_const("TCP_TIME_WAIT", headers) + have_const("TCP_CLOSE", headers) + have_const("TCP_CLOSE_WAIT", headers) + have_const("TCP_LAST_ACK", headers) + have_const("TCP_LISTEN", headers) + have_const("TCP_CLOSING", headers) + have_struct_member('struct tcp_info', 'tcpi_state', headers) + have_struct_member('struct tcp_info', 'tcpi_ca_state', headers) + have_struct_member('struct tcp_info', 'tcpi_retransmits', headers) + have_struct_member('struct tcp_info', 'tcpi_probes', headers) + have_struct_member('struct tcp_info', 'tcpi_backoff', headers) + have_struct_member('struct tcp_info', 'tcpi_options', headers) + have_struct_member('struct tcp_info', 'tcpi_snd_wscale', headers) + have_struct_member('struct tcp_info', 'tcpi_rcv_wscale', headers) + have_struct_member('struct tcp_info', 'tcpi_rto', headers) + have_struct_member('struct tcp_info', 'tcpi_ato', headers) + have_struct_member('struct tcp_info', 'tcpi_snd_mss', headers) + have_struct_member('struct tcp_info', 'tcpi_rcv_mss', headers) + have_struct_member('struct tcp_info', 'tcpi_unacked', headers) + have_struct_member('struct tcp_info', 'tcpi_sacked', headers) + have_struct_member('struct tcp_info', 'tcpi_lost', headers) + have_struct_member('struct tcp_info', 'tcpi_retrans', headers) + have_struct_member('struct tcp_info', 'tcpi_fackets', headers) + have_struct_member('struct tcp_info', 'tcpi_last_data_sent', headers) + have_struct_member('struct tcp_info', 'tcpi_last_ack_sent', headers) + have_struct_member('struct tcp_info', 'tcpi_last_data_recv', headers) + have_struct_member('struct tcp_info', 'tcpi_last_ack_recv', headers) + have_struct_member('struct tcp_info', 'tcpi_pmtu', headers) + have_struct_member('struct tcp_info', 'tcpi_rcv_ssthresh', headers) + have_struct_member('struct tcp_info', 'tcpi_rtt', headers) + have_struct_member('struct tcp_info', 'tcpi_rttvar', headers) + have_struct_member('struct tcp_info', 'tcpi_snd_ssthresh', headers) + have_struct_member('struct tcp_info', 'tcpi_snd_cwnd', headers) + have_struct_member('struct tcp_info', 'tcpi_advmss', headers) + have_struct_member('struct tcp_info', 'tcpi_reordering', headers) + have_struct_member('struct tcp_info', 'tcpi_rcv_rtt', headers) + have_struct_member('struct tcp_info', 'tcpi_rcv_space', headers) + have_struct_member('struct tcp_info', 'tcpi_total_retrans', headers) -# FreeBSD extension -have_struct_member('struct tcp_info', 'tcpi_snd_wnd', headers) -have_struct_member('struct tcp_info', 'tcpi_snd_bwnd', headers) -have_struct_member('struct tcp_info', 'tcpi_snd_nxt', headers) -have_struct_member('struct tcp_info', 'tcpi_rcv_nxt', headers) -have_struct_member('struct tcp_info', 'tcpi_toe_tid', headers) -have_struct_member('struct tcp_info', 'tcpi_snd_rexmitpack', headers) -have_struct_member('struct tcp_info', 'tcpi_rcv_ooopack', headers) -have_struct_member('struct tcp_info', 'tcpi_snd_zerowin', headers) + # FreeBSD extension + have_struct_member('struct tcp_info', 'tcpi_snd_wnd', headers) + have_struct_member('struct tcp_info', 'tcpi_snd_bwnd', headers) + have_struct_member('struct tcp_info', 'tcpi_snd_nxt', headers) + have_struct_member('struct tcp_info', 'tcpi_rcv_nxt', headers) + have_struct_member('struct tcp_info', 'tcpi_toe_tid', headers) + have_struct_member('struct tcp_info', 'tcpi_snd_rexmitpack', headers) + have_struct_member('struct tcp_info', 'tcpi_rcv_ooopack', headers) + have_struct_member('struct tcp_info', 'tcpi_snd_zerowin', headers) +end case RUBY_PLATFORM when /mswin(32|64)|mingw/ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/