From c45c1ec209cd07eef351f20dc18a184834677a73 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: http://svn.ruby-lang.org/repos/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 95aeefcc2..27e29f604 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 c6c465b5e..b588d9821 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 57e1c22bc..c7df71585 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