ruby-changes:16912
From: akr <ko1@a...>
Date: Sun, 8 Aug 2010 00:44:45 +0900 (JST)
Subject: [ruby-changes:16912] Ruby:r28907 (trunk): * include/ruby/subst.h: new file for substitute standard functions..
akr 2010-08-08 00:44:27 +0900 (Sun, 08 Aug 2010) New Revision: 28907 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28907 Log: * include/ruby/subst.h: new file for substitute standard functions.. * include/ruby/missing.h: don't substitute "close", etc. here. * include/ruby/ruby.h: include ruby/subst.h at last. This prevents substituting "close" in unitstd.h. Added files: trunk/include/ruby/subst.h Modified files: trunk/ChangeLog trunk/include/ruby/missing.h trunk/include/ruby/ruby.h Index: include/ruby/subst.h =================================================================== --- include/ruby/subst.h (revision 0) +++ include/ruby/subst.h (revision 28907) @@ -0,0 +1,15 @@ +#ifndef RUBY_SUBST_H +#define RUBY_SUBST_H 1 + +#ifdef BROKEN_CLOSE +#undef getpeername +#define getpeername ruby_getpeername +#undef getsockname +#define getsockname ruby_getsockname +#undef shutdown +#define shutdown ruby_shutdown +#undef close +#define close ruby_close +#endif + +#endif Property changes on: include/ruby/subst.h ___________________________________________________________________ Added: svn:eol-style + LF Index: include/ruby/missing.h =================================================================== --- include/ruby/missing.h (revision 28906) +++ include/ruby/missing.h (revision 28907) @@ -191,14 +191,6 @@ RUBY_EXTERN int ruby_getsockname(int, struct sockaddr *, socklen_t *); RUBY_EXTERN int ruby_shutdown(int, int); RUBY_EXTERN int ruby_close(int); -#undef getpeername -#define getpeername ruby_getpeername -#undef getsockname -#define getsockname ruby_getsockname -#undef shutdown -#define shutdown ruby_shutdown -#undef close -#define close ruby_close #endif #if defined __GNUC__ && __GNUC__ >= 4 Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 28906) +++ include/ruby/ruby.h (revision 28907) @@ -1442,6 +1442,10 @@ #pragma GCC visibility pop #endif +#ifndef RUBY_DONT_SUBST +#include "ruby/subst.h" +#endif + #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ Index: ChangeLog =================================================================== --- ChangeLog (revision 28906) +++ ChangeLog (revision 28907) @@ -1,3 +1,12 @@ +Sun Aug 8 00:41:42 2010 Tanaka Akira <akr@f...> + + * include/ruby/subst.h: new file for substitute standard functions.. + + * include/ruby/missing.h: don't substitute "close", etc. here. + + * include/ruby/ruby.h: include ruby/subst.h at last. + This prevents substituting "close" in unitstd.h. + Sat Aug 7 19:51:10 2010 Tanaka Akira <akr@f...> * test/ruby/envutil.rb (EnvUtil.invoke_ruby): merge stdout and stderr -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/