[前][次][番号順一覧][スレッド一覧]

ruby-changes:42935

From: nobu <ko1@a...>
Date: Sun, 15 May 2016 22:55:01 +0900 (JST)
Subject: [ruby-changes:42935] nobu:r55009 (trunk): io.c: use PRI_OFFT_PREFIX for off_t

nobu	2016-05-15 22:54:57 +0900 (Sun, 15 May 2016)

  New Revision: 55009

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55009

  Log:
    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.

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 55008)
+++ io.c	(revision 55009)
@@ -60,13 +60,6 @@ https://github.com/ruby/ruby/blob/trunk/io.c#L60
 #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 https://github.com/ruby/ruby/blob/trunk/io.c#L8614
 	/* 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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]