Skip to content

Commit

Permalink
merges r28754, r28756 and r28777 from trunk into ruby_1_9_2.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mame committed Aug 4, 2010
1 parent f21f68a commit 6877a2d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
17 changes: 17 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 4 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/missing.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/ruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6877a2d

Please sign in to comment.