mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
074ad688b1
commit
21ba5836e6
3 changed files with 6 additions and 26 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Aug 19 21:50:43 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* include/ruby/io.h (rb_fopen): declaration removed.
|
||||
|
||||
* io.c (rb_fopen): unused function removed.
|
||||
|
||||
Tue Aug 19 21:14:22 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* include/ruby/io.h (FMODE_READWRITE): define as
|
||||
|
|
|
@ -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);
|
||||
|
|
25
io.c
25
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue