From 87dc7ec05b96472168d234ffc09a4484390b1b42 Mon Sep 17 00:00:00 2001 From: ocean Date: Tue, 19 Jul 2005 19:04:46 +0000 Subject: * ext/socket/socket.c: sorry, BeOS also uses HAVE_CLOSESOCKET, so reverted. * ext/socket/extconf.rb: should not define HAVE_CLOSESOCKET on windows. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ ext/socket/extconf.rb | 2 -- ext/socket/socket.c | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3873869ef..0ae173b22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Jul 20 04:01:55 2005 Hirokazu Yamamoto + + * ext/socket/socket.c: sorry, BeOS also uses HAVE_CLOSESOCKET, + so reverted. + + * ext/socket/extconf.rb: should not define HAVE_CLOSESOCKET + on windows. + Wed Jul 20 03:16:43 2005 Hirokazu Yamamoto * ext/socket/socket.c: should not undef close() on win32. diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 4c7d32af3..28f38140b 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -4,11 +4,9 @@ case RUBY_PLATFORM when /bccwin32/ test_func = "WSACleanup" have_library("ws2_32", "WSACleanup") - have_func("closesocket") when /mswin32|mingw/ test_func = "WSACleanup" have_library("wsock32", "WSACleanup") - have_func("closesocket") when /cygwin/ test_func = "socket" when /beos/ diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 7c6610c14..68ceb284f 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -197,6 +197,11 @@ ruby_getaddrinfo__aix(nodename, servname, hints, res) #define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res)) #endif +#ifdef HAVE_CLOSESOCKET +#undef close +#define close closesocket +#endif + static VALUE init_sock(sock, fd) VALUE sock; -- cgit