summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-04 09:49:51 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-04 09:49:51 +0000
commit6877a2de4c6106f279b6944f92efd480be4a8651 (patch)
tree3b5044fba7a5fddd9170e4a2413e9bda272cb5b8 /include
parentf21f68a1a0320024dbb4e09bcc49e031de1ea643 (diff)
merges r28754, r28756 and r28777 from trunk into ruby_1_9_2.
These are needed to fix build failure on windows. [ruby-dev:41929] -- * configure.in: not [freebsd] but [freebsd*] for AS_CASE. * configure.in: define BROKEN_CLOSE only on FreeBSD. This needs to merge to 1.9.2. * 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/branches/ruby_1_9_2@28852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/missing.h2
-rw-r--r--include/ruby/ruby.h2
2 files changed, 2 insertions, 2 deletions
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