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

ruby-changes:28034

From: akr <ko1@a...>
Date: Wed, 3 Apr 2013 22:10:13 +0900 (JST)
Subject: [ruby-changes:28034] akr:r40086 (trunk): * ext/socket/extconf.rb: Test functions and libraries after headers.

akr	2013-04-03 22:10:04 +0900 (Wed, 03 Apr 2013)

  New Revision: 40086

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

  Log:
    * ext/socket/extconf.rb: Test functions and libraries after headers.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/extconf.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40085)
+++ ChangeLog	(revision 40086)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Apr  3 22:09:25 2013  Tanaka Akira  <akr@f...>
+
+	* ext/socket/extconf.rb: Test functions and libraries after headers.
+
 Wed Apr  3 21:23:29 2013  Tanaka Akira  <akr@f...>
 
 	 * io.c (rb_io_seek_m): Accept :CUR, :END, :SET as "whence" argument.
Index: ext/socket/extconf.rb
===================================================================
--- ext/socket/extconf.rb	(revision 40085)
+++ ext/socket/extconf.rb	(revision 40086)
@@ -2,27 +2,6 @@ require 'mkmf' https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L2
 
 $INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
 
-case RUBY_PLATFORM
-when /(ms|bcc)win(32|64)|mingw/
-  test_func = "WSACleanup"
-  have_library("ws2_32", "WSACleanup")
-when /cygwin/
-  test_func = "socket"
-when /beos/
-  test_func = "socket"
-  have_library("net", "socket")
-when /haiku/
-  test_func = "socket"
-  have_library("network", "socket")
-when /i386-os2_emx/
-  test_func = "socket"
-  have_library("socket", "socket")
-else
-  test_func = "socket"
-  have_library("nsl", "t_open") # SunOS
-  have_library("socket", "socket") # SunOS
-end
-
 headers = []
 unless $mswin or $bccwin or $mingw
   headers = %w<sys/types.h netdb.h string.h sys/socket.h netinet/in.h>
@@ -83,6 +62,27 @@ have_type("struct ipv6_mreq", headers) # https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L62
 have_struct_member('struct msghdr', 'msg_control', headers) unless $mswin or $mingw
 have_struct_member('struct msghdr', 'msg_accrights', headers)
 
+case RUBY_PLATFORM
+when /(ms|bcc)win(32|64)|mingw/
+  test_func = "WSACleanup"
+  have_library("ws2_32", "WSACleanup", headers)
+when /cygwin/
+  test_func = "socket"
+when /beos/
+  test_func = "socket"
+  have_library("net", "socket", headers)
+when /haiku/
+  test_func = "socket"
+  have_library("network", "socket", headers)
+when /i386-os2_emx/
+  test_func = "socket"
+  have_library("socket", "socket", headers)
+else
+  test_func = "socket"
+  have_library("nsl", "t_open", headers) # SunOS
+  have_library("socket", "socket", headers) # SunOS
+end
+
 if have_func(test_func, headers)
 
   have_func("sendmsg", headers)

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

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