summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--configure.in5
-rw-r--r--include/ruby/missing.h2
-rw-r--r--include/ruby/ruby.h2
4 files changed, 23 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c3b0a21d6..4abb00f47e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Thu Jul 29 02:38:09 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: not [freebsd] but [freebsd*] for AS_CASE.
+
+Mon Jul 26 13:52:25 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: define BROKEN_CLOSE only on FreeBSD.
+ This needs to merge to 1.9.2.
+
+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 Aug 2 00:03:18 2010 Yusuke Endoh <mame@tsg.ne.jp>
* util.c (ruby_add_suffix): fixed a bug returning uninitialized value.
diff --git a/configure.in b/configure.in
index 760347141c..b3c5642fcf 100644
--- a/configure.in
+++ b/configure.in
@@ -1144,7 +1144,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 \
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index b16ce070c2..62d65b0aff 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -169,7 +169,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 *);
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index f262e98442..83df1a3946 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1422,7 +1422,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