diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-13 03:05:38 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-13 03:05:38 +0000 |
commit | ae0134eeadfa885245668af5f61597922b83df3f (patch) | |
tree | 907ac5a4d90374c9aa73c15d6595ae80f0a6048d /ext/bigdecimal/extconf.rb | |
parent | 74c4a0719c08347e8ca703a2565609100c705750 (diff) |
merge revision(s) 15415:
* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): use strtod() for more
precision. [ruby-talk:290296]
* ext/bigdecimal/bigdecimal.c (BASE_FIG): made constant.
* ext/bigdecimal/extconf.rb: ditto. [ruby-dev:33658]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/extconf.rb')
-rw-r--r-- | ext/bigdecimal/extconf.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/bigdecimal/extconf.rb b/ext/bigdecimal/extconf.rb index a68a656044..864aaad862 100644 --- a/ext/bigdecimal/extconf.rb +++ b/ext/bigdecimal/extconf.rb @@ -1,2 +1,12 @@ require 'mkmf' + +base_fig = 0 +src = ("(BASE > 0) && " + "(BASE * (BASE+1)) > BASE && " + "(BASE * (BASE+1)) / BASE == (BASE+1)") +while try_static_assert(src, nil, "-DBASE=10#{'0'*base_fig}UL") + base_fig += 1 +end +$defs << "-DBASE=1#{'0'*base_fig}UL" << "-DBASE_FIG=#{base_fig}" + create_makefile('bigdecimal') |