summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/extconf.rb
blob: 0c8b98e4a34b1747673a86c17d1f076b26525324 (plain)
1
2
3
4
5
6
7
8
9
10
require 'mkmf'

base_fig = 0
src = "(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')