ruby-changes:16758
From: naruse <ko1@a...>
Date: Mon, 26 Jul 2010 12:05:42 +0900 (JST)
Subject: [ruby-changes:16758] Ruby:r28754 (trunk): * configure.in: define BROKEN_CLOSE on FreeBSD.
naruse 2010-07-26 12:05:25 +0900 (Mon, 26 Jul 2010) New Revision: 28754 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28754 Log: * configure.in: define BROKEN_CLOSE on FreeBSD. This fixes build failure on MSVC. [ruby-core:31481] * include/ruby/ruby.h, include/ruby/missing.h: use BROKEN_CLOSE for replacing close(2). Modified files: trunk/ChangeLog trunk/configure.in trunk/include/ruby/missing.h trunk/include/ruby/ruby.h Index: include/ruby/missing.h =================================================================== --- include/ruby/missing.h (revision 28753) +++ include/ruby/missing.h (revision 28754) @@ -175,7 +175,7 @@ RUBY_EXTERN int ffs(int); #endif -#ifndef HAVE_CLOSE +#ifdef BROKEN_CLOSE #include <sys/types.h> #include <sys/socket.h> RUBY_EXTERN int ruby_getpeername(int, struct sockaddr *, socklen_t *); Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 28753) +++ include/ruby/ruby.h (revision 28754) @@ -1440,7 +1440,7 @@ #define snprintf ruby_snprintf #define vsnprintf ruby_vsnprintf -#ifdef __FreeBSD__ +#ifdef BROKEN_CLOSE #undef getpeername #define getpeername ruby_getpeername #undef getsockname Index: configure.in =================================================================== --- configure.in (revision 28753) +++ configure.in (revision 28754) @@ -1155,7 +1155,10 @@ rb_cv_broken_glibc_ia64_erfc=no)]) AS_CASE([$rb_cv_broken_glibc_ia64_erfc],[yes],[ac_cv_func_erf=no]) -AS_CASE(["$target_os"],[freebsd],[],[AC_REPLACE_FUNCS(close)]) +AS_CASE(["$target_os"],[freebsd],[],[ + AC_DEFINE(BROKEN_CLOSE) + AC_REPLACE_FUNCS(close) + ]) AC_REPLACE_FUNCS(dup2 memmove strerror\ strchr strstr crypt flock\ isnan finite isinf hypot acosh erf tgamma lgamma_r cbrt \ Index: ChangeLog =================================================================== --- ChangeLog (revision 28753) +++ ChangeLog (revision 28754) @@ -1,3 +1,11 @@ +Mon Jul 26 11:51:01 2010 NARUSE, Yui <naruse@r...> + + * configure.in: define BROKEN_CLOSE on FreeBSD. + This fixes build failure on MSVC. [ruby-core:31481] + + * include/ruby/ruby.h, include/ruby/missing.h: + use BROKEN_CLOSE for replacing close(2). + Mon Jul 26 09:51:20 2010 Nobuyoshi Nakada <nobu@r...> * vm.c (rb_thread_mark): mark only self of normal iseqs, not -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/