ruby-changes:6544
From: usa <ko1@a...>
Date: Mon, 14 Jul 2008 13:37:57 +0900 (JST)
Subject: [ruby-changes:6544] Ruby:r18060 (trunk): * ext/socket/extconf.rb: initialize winsock on win32 to avoid error
usa 2008-07-14 13:37:21 +0900 (Mon, 14 Jul 2008) New Revision: 18060 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18060 Log: * ext/socket/extconf.rb: initialize winsock on win32 to avoid error dialog of OS. Modified files: trunk/ChangeLog trunk/ext/socket/extconf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 18059) +++ ChangeLog (revision 18060) @@ -1,3 +1,8 @@ +Mon Jul 14 13:36:15 2008 NAKAMURA Usaku <usa@r...> + + * ext/socket/extconf.rb: initialize winsock on win32 to avoid error + dialog of OS. + Mon Jul 14 06:02:26 2008 Nobuyoshi Nakada <nobu@r...> * lib/optparse.rb (OptionParser#environment): requires shellwords. Index: ext/socket/extconf.rb =================================================================== --- ext/socket/extconf.rb (revision 18059) +++ ext/socket/extconf.rb (revision 18060) @@ -125,7 +125,12 @@ int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; char straddr[INET6_ADDRSTRLEN], strport[16]; +#ifdef _WIN32 + WSADATA retdata; + WSAStartup(MAKEWORD(2, 0), &retdata); +#endif + for (passive = 0; passive <= 1; passive++) { memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/