From 1c0b507b79799f45de344c4b21103472fe3e5082 Mon Sep 17 00:00:00 2001 From: kanemoto Date: Sun, 8 Jun 2014 14:39:27 +0000 Subject: [PATCH] io.c (rb_io_advise): AIX currently does not support a 32-bit call to posix_fadvise() if _LARGE_FILES is defined. Patch by Rei Odaira. [ruby-core:62968] [Bug #9914] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ io.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0c34e27ebe..2b33091503 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Jun 8 23:28:00 2014 + + * io.c (rb_io_advise): AIX currently does not support a 32-bit call to + posix_fadvise() if _LARGE_FILES is defined. Patch by Rei Odaira. + [ruby-core:62968] [Bug #9914] + Sun Jun 8 04:52:40 2014 Jun Hiroe * string.c (rb_str_slice_bang): [DOC] update return value against diff --git a/io.c b/io.c index 9900118818..81067126d0 100644 --- a/io.c +++ b/io.c @@ -8591,7 +8591,10 @@ rb_io_advise(int argc, VALUE *argv, VALUE io) off = NIL_P(offset) ? 0 : NUM2OFFT(offset); l = NIL_P(len) ? 0 : NUM2OFFT(len); -#ifdef HAVE_POSIX_FADVISE + /* AIX currently does not support a 32-bit call to posix_fadvise() + * if _LARGE_FILES is defined. + */ +#if defined(HAVE_POSIX_FADVISE) && !(defined(_AIX) && defined(_LARGE_FILES) && !defined(_ARCH_PPC64)) return do_io_advise(fptr, advice, off, l); #else ((void)off, (void)l); /* Ignore all hint */