1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-07-26 03:05:25 +00:00
parent 5edb56b83c
commit 201d99cc5f
4 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,11 @@
Mon Jul 26 11:51:01 2010 NARUSE, Yui <naruse@ruby-lang.org>
* 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@ruby-lang.org>
* vm.c (rb_thread_mark): mark only self of normal iseqs, not

View file

@ -1155,7 +1155,10 @@ main()
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 \

View file

@ -175,7 +175,7 @@ RUBY_EXTERN int signbit(double x);
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 *);

View file

@ -1440,7 +1440,7 @@ int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
#define snprintf ruby_snprintf
#define vsnprintf ruby_vsnprintf
#ifdef __FreeBSD__
#ifdef BROKEN_CLOSE
#undef getpeername
#define getpeername ruby_getpeername
#undef getsockname