Feature #5995 » patch.diff
io.c | ||
---|---|---|
#endif
|
||
}
|
||
#ifdef HAVE_POSIX_FADVISE
|
||
struct io_advise_struct {
|
||
int fd;
|
||
off_t offset;
|
||
off_t len;
|
||
int advice;
|
||
};
|
||
#ifdef POSIX_FADV_SEQUENTIAL
|
||
static VALUE io_advise_internal(void *arg);
|
||
#endif /* POSIX_FADV_SEQUENTIAL */
|
||
#endif /* HAVE_POSIX_FADVISE */
|
||
static VALUE
|
||
read_all(rb_io_t *fptr, long siz, VALUE str)
|
||
{
|
||
... | ... | |
rb_encoding *enc;
|
||
int cr;
|
||
#ifdef HAVE_POSIX_FADVISE
|
||
#ifdef POSIX_FADV_SEQUENTIAL
|
||
struct io_advise_struct ias;
|
||
ias.fd = fptr->fd;
|
||
ias.advice = POSIX_FADV_SEQUENTIAL;
|
||
ias.offset = 0;
|
||
ias.len = 0;
|
||
io_advise_internal(&ias);
|
||
#endif /* POSIX_FADV_SEQUENTIAL */
|
||
#endif /* HAVE_POSIX_FADVISE */
|
||
if (NEED_READCONV(fptr)) {
|
||
SET_BINARY_MODE(fptr);
|
||
io_setstrbuf(&str,0);
|
||
... | ... | |
sym_willneed, sym_dontneed, sym_noreuse;
|
||
#ifdef HAVE_POSIX_FADVISE
|
||
struct io_advise_struct {
|
||
int fd;
|
||
off_t offset;
|
||
off_t len;
|
||
int advice;
|
||
};
|
||
static VALUE
|
||
io_advise_internal(void *arg)
|
||
{
|