From 21ba5836e62f142c39697fc0cf6775448615e1cc Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 19 Aug 2008 12:51:52 +0000 Subject: * include/ruby/io.h (rb_fopen): declaration removed. * io.c (rb_fopen): unused function removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ include/ruby/io.h | 1 - io.c | 25 ------------------------- 3 files changed, 6 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95aeefcc25..27e29f6048 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Aug 19 21:50:43 2008 Tanaka Akira + + * include/ruby/io.h (rb_fopen): declaration removed. + + * io.c (rb_fopen): unused function removed. + Tue Aug 19 21:14:22 2008 Tanaka Akira * include/ruby/io.h (FMODE_READWRITE): define as diff --git a/include/ruby/io.h b/include/ruby/io.h index c6c465b5ed..b588d98219 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -125,7 +125,6 @@ typedef struct rb_io_t { FILE *rb_io_stdio_file(rb_io_t *fptr); -FILE *rb_fopen(const char*, const char*); FILE *rb_fdopen(int, const char*); int rb_io_mode_flags(const char*); int rb_io_modenum_flags(int); diff --git a/io.c b/io.c index 57e1c22bc0..c7df715853 100644 --- a/io.c +++ b/io.c @@ -3783,31 +3783,6 @@ rb_sysopen(char *fname, int flags, unsigned int mode) return fd; } -FILE * -rb_fopen(const char *fname, const char *mode) -{ - FILE *file; - - file = fopen(fname, mode); - if (!file) { - if (errno == EMFILE || errno == ENFILE) { - rb_gc(); - file = fopen(fname, mode); - } - if (!file) { - rb_sys_fail(fname); - } - } -#ifdef USE_SETVBUF - if (setvbuf(file, NULL, _IOFBF, 0) != 0) - rb_warn("setvbuf() can't be honoured for %s", fname); -#endif -#ifdef __human68k__ - setmode(fileno(file), O_TEXT); -#endif - return file; -} - FILE * rb_fdopen(int fd, const char *mode) { -- cgit v1.2.3