ruby-changes:18456
From: usa <ko1@a...>
Date: Thu, 6 Jan 2011 19:30:11 +0900 (JST)
Subject: [ruby-changes:18456] Ruby:r30479 (ruby_1_8): * ext/socket/{getaddrinfo,getnameinfo}.c: include winsock2.h only when
usa 2011-01-06 19:30:00 +0900 (Thu, 06 Jan 2011) New Revision: 30479 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30479 Log: * ext/socket/{getaddrinfo,getnameinfo}.c: include winsock2.h only when specified to use winsock2 by user. this problem is reported by kosaki. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/ext/socket/getaddrinfo.c branches/ruby_1_8/ext/socket/getnameinfo.c Index: ruby_1_8/ext/socket/getaddrinfo.c =================================================================== --- ruby_1_8/ext/socket/getaddrinfo.c (revision 30478) +++ ruby_1_8/ext/socket/getaddrinfo.c (revision 30479) @@ -71,7 +71,11 @@ #include <in.h> #include <netdb.h> #else +#if USE_WINSOCK2 #include <winsock2.h> +#else +#include <winsock.h> +#endif #include <io.h> #endif #include <string.h> Index: ruby_1_8/ext/socket/getnameinfo.c =================================================================== --- ruby_1_8/ext/socket/getnameinfo.c (revision 30478) +++ ruby_1_8/ext/socket/getnameinfo.c (revision 30479) @@ -56,7 +56,11 @@ #endif #endif #ifdef _WIN32 +#if USE_WINSOCK2 #include <winsock2.h> +#else +#include <winsock.h> +#endif #define snprintf _snprintf #endif Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 30478) +++ ruby_1_8/ChangeLog (revision 30479) @@ -1,3 +1,9 @@ +Thu Jan 6 19:28:36 2011 NAKAMURA Usaku <usa@r...> + + * ext/socket/{getaddrinfo,getnameinfo}.c: include winsock2.h only when + specified to use winsock2 by user. + this problem is reported by kosaki. + Thu Jan 6 18:12:24 2011 NAKAMURA Usaku <usa@r...> * win32/README.win32: fix the misunderstanding of previous commit. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/