Feature #5995 ยป patch2.diff
io.c | ||
---|---|---|
2087 | 2087 |
rb_str_modify_expand(*str, len); |
2088 | 2088 |
} |
2089 | 2089 | |
2090 |
static VALUE sym_sequential; |
|
2091 |
#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_SEQUENTIAL) |
|
2092 |
static VALUE do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len); |
|
2093 |
#endif |
|
2094 | ||
2090 | 2095 |
static VALUE |
2091 | 2096 |
read_all(rb_io_t *fptr, long siz, VALUE str) |
2092 | 2097 |
{ |
... | ... | |
2096 | 2101 |
rb_encoding *enc; |
2097 | 2102 |
int cr; |
2098 | 2103 | |
2104 |
#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_SEQUENTIAL) |
|
2105 |
do_io_advise(fptr, sym_sequential, (off_t)0LL, (off_t)0LL); |
|
2106 |
#endif |
|
2107 | ||
2099 | 2108 |
if (NEED_READCONV(fptr)) { |
2100 | 2109 |
SET_BINARY_MODE(fptr); |
2101 | 2110 |
io_setstrbuf(&str,0); |
... | ... | |
7875 | 7884 |
return Qnil; |
7876 | 7885 |
} |
7877 | 7886 | |
7878 |
static VALUE sym_normal, sym_sequential, sym_random,
|
|
7887 |
static VALUE sym_normal, sym_random, |
|
7879 | 7888 |
sym_willneed, sym_dontneed, sym_noreuse; |
7880 | 7889 | |
7881 | 7890 |
#ifdef HAVE_POSIX_FADVISE |