ruby-changes:30387
From: charliesome <ko1@a...>
Date: Fri, 9 Aug 2013 19:19:02 +0900 (JST)
Subject: [ruby-changes:30387] charliesome:r42466 (trunk): * ext/io/console/console.c: delete redefinition of rb_cloexec_open.
charliesome 2013-08-09 19:18:56 +0900 (Fri, 09 Aug 2013) New Revision: 42466 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42466 Log: * ext/io/console/console.c: delete redefinition of rb_cloexec_open. This function is always defined by io.c and is declared as non-static in a header file, so this declaration causes a compilation error. Modified files: trunk/ChangeLog trunk/ext/io/console/console.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42465) +++ ChangeLog (revision 42466) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Aug 9 07:16:00 2013 Charlie Somerville <charliesome@r...> + + * ext/io/console/console.c: delete redefinition of rb_cloexec_open. + This function is always defined by io.c and is declared as non-static + in a header file, so this declaration causes a compilation error. + Fri Aug 9 19:13:54 2013 Koichi Sasada <ko1@a...> * NEWS: update about new methods for Binding. Index: ext/io/console/console.c =================================================================== --- ext/io/console/console.c (revision 42465) +++ ext/io/console/console.c (revision 42466) @@ -668,23 +668,6 @@ console_ioflush(VALUE io) https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L668 return io; } -#ifndef HAVE_RB_CLOEXEC_OPEN -static int -rb_cloexec_open(const char *pathname, int flags, mode_t mode) -{ - int ret; -#ifdef O_CLOEXEC - /* O_CLOEXEC is available since Linux 2.6.23. Linux 2.6.18 silently ignore it. */ - flags |= O_CLOEXEC; -#elif defined O_NOINHERIT - flags |= O_NOINHERIT; -#endif - return open(pathname, flags, mode); -} - -#define rb_update_max_fd(fd) (void)(fd) -#endif - /* * call-seq: * IO.console -> #<File:/dev/tty> -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/