From 1a6a65f16bb8f9f8035dc8d4689ec0b6032047d0 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 18 Jun 2013 09:46:01 +0000 Subject: * configure.in: Check __int128. * include/ruby/defines.h (BDIGIT_DBL): Use uint128_t if it is available. (BDIGIT): Use uint64_t if uint128_t is available. (SIZEOF_BDIGITS): Defined for above case. (BDIGIT_DBL_SIGNED): Ditto. (PRI_BDIGIT_PREFIX): Ditto. * include/ruby/ruby.h (PRI_64_PREFIX): Defined. * bignum.c (rb_big_pow): Don't use BITSPERDIG for the condition which rb_big_pow returns Float or Bignum. [ruby-dev:47413] [Feature #8509] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/ruby/ruby.h') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index df5209f0bb..6d82afbc0e 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -115,6 +115,12 @@ typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1]; #define PRI_LONG_PREFIX "l" #endif +#if SIZEOF_LONG == 8 +#define PRI_64_PREFIX PRI_LONG_PREFIX +#elif SIZEOF_LONG_LONG == 8 +#define PRI_64_PREFIX PRI_LL_PREFIX +#endif + #if defined PRIdPTR && !defined PRI_VALUE_PREFIX #define PRIdVALUE PRIdPTR #define PRIoVALUE PRIoPTR -- cgit v1.2.3