diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-12 08:41:24 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-12 08:41:24 +0000 |
commit | 05628d3b6d49bd301f16acdb882442c81d97475d (patch) | |
tree | 1fe1320947bbb0aeb180e26961878d57ca6e3e37 /include | |
parent | e79f7907987d9dc2445892b7b571a621208d29bf (diff) | |
download | ruby-05628d3b6d49bd301f16acdb882442c81d97475d.tar.gz |
* 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
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/ruby.h | 10 |
1 files changed, 6 insertions, 4 deletions
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 |