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

ruby-changes:27173

From: akr <ko1@a...>
Date: Wed, 13 Feb 2013 21:01:38 +0900 (JST)
Subject: [ruby-changes:27173] akr:r39225 (trunk): * ext/socket/extconf.rb: don't define socklen_t here, just test.

akr	2013-02-13 21:01:24 +0900 (Wed, 13 Feb 2013)

  New Revision: 39225

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

  Log:
    * ext/socket/extconf.rb: don't define socklen_t here, just test.
    
    * ext/socket/rubysocket.h: define socklen_t if not available.

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39224)
+++ ChangeLog	(revision 39225)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Feb 13 20:59:48 2013  Tanaka Akira  <akr@f...>
+
+	* ext/socket/extconf.rb: don't define socklen_t here, just test.
+
+	* ext/socket/rubysocket.h: define socklen_t if not available.
+
 Wed Feb 13 18:37:50 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* proc.c (mnew): skip prepending modules and return the method bound
Index: ext/socket/rubysocket.h
===================================================================
--- ext/socket/rubysocket.h	(revision 39224)
+++ ext/socket/rubysocket.h	(revision 39225)
@@ -86,6 +86,10 @@ https://github.com/ruby/ruby/blob/trunk/ext/socket/rubysocket.h#L86
 #include <ucred.h>
 #endif
 
+#ifndef HAVE_TYPE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
 #ifndef EWOULDBLOCK
 #define EWOULDBLOCK EAGAIN
 #endif
Index: ext/socket/extconf.rb
===================================================================
--- ext/socket/extconf.rb	(revision 39224)
+++ ext/socket/extconf.rb	(revision 39225)
@@ -56,9 +56,7 @@ have_header("ucred.h", headers) https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L56
 
 have_type("struct addrinfo", headers)
 
-unless have_type("socklen_t", headers)
-  $defs << "-Dsocklen_t=int"
-end
+have_type("socklen_t", headers)
 
 have_type("struct in_pktinfo", headers) {|src|
   src.sub(%r'^/\*top\*/', '\&'"\n#if defined(IPPROTO_IP) && defined(IP_PKTINFO)") <<

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

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