diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-15 13:54:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-15 13:54:57 +0000 |
commit | 7803106c1bdaf8c067d29fced64bee0e3e15a435 (patch) | |
tree | 93c401c5a3c9608071c2afcc204f9450450c374f /io.c | |
parent | e143a741913fd970e27eb83e3d809d9694038f9f (diff) | |
download | ruby-7803106c1bdaf8c067d29fced64bee0e3e15a435.tar.gz |
io.c: use PRI_OFFT_PREFIX for off_t
* io.c (do_io_advise): use configured PRI_OFFT_PREFIX instead of
PRI_OFF_T_PREFIX to format off_t properly on Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -60,13 +60,6 @@ #if !HAVE_OFF_T && !defined(off_t) # define off_t long #endif -#if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_LONG_LONG) -# define PRI_OFF_T_PREFIX "ll" -#elif SIZEOF_OFF_T == SIZEOF_LONG -# define PRI_OFF_T_PREFIX "l" -#else -# define PRI_OFF_T_PREFIX "" -#endif #ifdef HAVE_SYS_TIME_H # include <sys/time.h> @@ -8621,8 +8614,8 @@ do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len) /* posix_fadvise(2) doesn't set errno. On success it returns 0; otherwise it returns the error code. */ VALUE message = rb_sprintf("%"PRIsVALUE" " - "(%"PRI_OFF_T_PREFIX"d, " - "%"PRI_OFF_T_PREFIX"d, " + "(%"PRI_OFFT_PREFIX"d, " + "%"PRI_OFFT_PREFIX"d, " "%"PRIsVALUE")", fptr->pathv, offset, len, advice); rb_syserr_fail_str(rv, message); |