From 73f94bb851588f04e5189d37544e87884fc489c7 Mon Sep 17 00:00:00 2001 From: ocean Date: Fri, 21 Oct 2005 06:46:41 +0000 Subject: * intern.h, struct.c (rb_struct_iv_get): constified. * marshal.c: avoid one VC++6 warning for implicit conversion from int to char. * ruby.h: ANSI styled. * bcc32/Makefile.sub (HAVE_HYPOT): added. * ext/socket/extconf.rb: BeOS is only one platform should call closesocket, so check __BEOS__ macro directly. (I was worried accidently HAVE_CLOSESOCKET is defined on windows again because it has it) * ext/socket/{getaddrinfo.c,socket.c}: ditto. ... these are all cosmetic changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/extconf.rb | 1 - ext/socket/getaddrinfo.c | 2 +- ext/socket/socket.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index da498639ad..a83afa558d 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -9,7 +9,6 @@ when /cygwin/ when /beos/ test_func = "socket" have_library("net", "socket") - have_func("closesocket") when /i386-os2_emx/ test_func = "socket" have_library("socket", "socket") diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index 14bedb2e9b..02f2ab9d35 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -437,7 +437,7 @@ getaddrinfo(hostname, servname, hints, res) s = socket(afd->a_af, SOCK_DGRAM, 0); if (s < 0) continue; -#if defined(HAVE_CLOSESOCKET) +#if defined(__BEOS__) closesocket(s); #else close(s); diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 6a787629f8..1037c8546b 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -193,7 +193,7 @@ ruby_getaddrinfo__aix(nodename, servname, hints, res) #define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res)) #endif -#ifdef HAVE_CLOSESOCKET +#ifdef __BEOS__ #undef close #define close closesocket #endif -- cgit v1.2.3