mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02: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
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