From 05628d3b6d49bd301f16acdb882442c81d97475d Mon Sep 17 00:00:00 2001 From: kosaki Date: Sun, 12 May 2013 08:41:24 +0000 Subject: * configure.in: removes AC_CHECK_FUNC(ftruncate64). * configure.in: adds RUBY_REPLACE_TYPE(off_t) for creating NUM2OFFT. * file.c (rb_file_truncate): use correct type. chsize() take a long. * include/ruby/ruby.h (NUM2OFFT): use a definition created by a configure script by default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index c1bf06d6e4..aefd563a40 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -641,10 +641,12 @@ rb_num2ll_inline(VALUE x) # define NUM2ULL(x) rb_num2ull(x) #endif -#if defined(HAVE_LONG_LONG) && SIZEOF_OFF_T > SIZEOF_LONG -# define NUM2OFFT(x) ((off_t)NUM2LL(x)) -#else -# define NUM2OFFT(x) NUM2LONG(x) +#if !defined(NUM2OFFT) +# if defined(HAVE_LONG_LONG) && SIZEOF_OFF_T > SIZEOF_LONG +# define NUM2OFFT(x) ((off_t)NUM2LL(x)) +# else +# define NUM2OFFT(x) NUM2LONG(x) +# endif #endif #if defined(HAVE_LONG_LONG) && SIZEOF_SIZE_T > SIZEOF_LONG -- cgit v1.2.3